Search This Blog

Sunday, November 9, 2014

Adding log4net for asp.net app

add reference to the newest log4net dll

add the configSections right after the configuration section in the web.config

add into the  end of the file AssemblyInfo.cs
[assembly: log4net.Config.XmlConfigurator(Watch = true)]

in the code:
private static readonly ILog log = LogManager.GetLogger(typeof(Myclass));

sources:
http://logging.apache.org/log4net/release/manual/configuration.html


option two:
is too have the config file not in the web.config via
add into the  end of the file AssemblyInfo.cs

[assembly: log4net.Config.XmlConfigurator(ConfigFile="log4net.config",Watch = true)]

Wednesday, October 22, 2014

Delete from /system/app/ or /system/priv-app

if you are not familiar with the priv-app folder here is the link

What's the difference of /system/app/ and /system/priv-app in Kitkat? - Google Groups:



this is how i managed to delete file from priv-app to free so space



open adb



su

mount -o rw,remount /system

cd /system/priv-app

 --- rm  any file apk or odex

 rm VisualVoicemail.*.

 rm AppStore.*

 mount -o ro,remount /system





enjoy

yaniv

Tuesday, October 21, 2014

Instant Oracle Using C# / asp.net

I  developed  a WS site , via oracle client 12 , when i tried to deploy it on server i find out  that there is an oracle client 11 install there, i found the way to use oracle 12 in my web site , and managed to grab the right dll to make it work.



its all started when i get the next error on server, i undertood that i am running with different oracle version:

Could not load file or assembly 'Oracle.DataAccess, Version=4.121.1.0 Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.


i looked in my machine.config and i found out that i am using oracle data access  Version=4.112.3.0 - an older verion.


i download the oracle instant client  (based on the version i wanted )  instantclient-basic-nt-12.1.0.2.0.zip.

i copied the next dlls into my bin folder :



oci.dll

oraocci12.dll

oraociei12.dll

oraons.dll

OraOps12.dll


and also the Oracle.DataAccess.dll from my dev machine.

the connection string must look like this :



connectionString="Data Source=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = Yaniv-il-db.domain.int)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = Yanivil)));User Id=MyUSer;Password=Mypwd;" providerName="Oracle.DataAccess.Client"



and its worked

enjoy

Yaniv Tzanany

Wednesday, October 15, 2014

Parse File

url to parse file kept in amazon server
in this format - http://files.parsetfss.com/[LONG_CRYPTIC_PATH]
you can get the url via parsefile.geturl

sample how to get parse file from object
http://stackoverflow.com/questions/14503689/get-file-from-parseobject

there is parse image viewer
https://www.parse.com/questions/displaying-android-parseimageview

to clean up files manually:

From the data browser you can remove all files that no longer have references pointing to them.
Go to "Settings", "General Settings", scroll down and you will see a "Clean up files" option.

when parse file deleted:
Clean Up Files | Parse:


'via Blog this'

Sunday, October 12, 2014

The Process object in Performance Monitor can display Process IDs (PIDs)

if you want to show the process ID in the performence monitor tools , follow the next link.

The Process object in Performance Monitor can display Process IDs (PIDs): "ProcessNameFormat "


Tuesday, July 22, 2014

WCF Tools

there is this tool SvcConfigEditor.exeThe Windows Communication Foundation (WCF) Service Configuration Editor (SvcConfigEditor.exe) allows administrators and developers to create and modify configuration settings for WCF services using a graphical user interface. With this tool, you can manage settings for WCF bindings, behaviors, services, and diagnostics without having to directly edit XML configuration files.



Service Trace Viewer Tool -  (SvcTraceViewer.exe) - Windows Communication Foundation (WCF) Service Trace Viewer Tool helps you analyze diagnostic traces that are generated by WCF. Service Trace Viewer provides a way to easily merge, view, and filter trace messages in the log so that you can diagnose, repair, and verify WCF service issues.


WCF Test Client (WcfTestClient.exe) - 
Windows Communication Foundation (WCF) Test Client (WcfTestClient.exe) is a GUI tool that enables users to input test parameters, submit that input to the service, and view the response that the service sends back. It provides a seamless service testing experience when combined with WCF Service Host.

Trace in WCF  - WCF Extensibility – System.Diagnostic Tracing


Yaniv Tzanany







Friday, July 18, 2014

Android Parse - how to unregistered from push service

The service automatically shuts down if it does not understand how to route pushes.
 If you call PushService.unsubscribe for all the channels for which you called PushService.subscribe. If you called PushService.setDefaultCallback, call it again passing null as the class.

Thursday, July 17, 2014

Connect JMX into ActiveMQ

this is how to connect JMX to ActiveMQ via VisualVM.

edit the activemq.xml in the conf folder.

search for the node managementContext

set the createConnector="true" and add  connectorPort="XXXX",
XXX is a port number.

e.g.
        <managementContext>
            <managementContext createConnector="true" connectorPort="1199"/>
        </managementContext>


open the VisualVM
add remote host if needed
add JMX connection


       

           
i liked to add the VisuaulVM Mbeans plugin - to send message to active mq

       


this how i can send messages into it


enjoy
Yaniv Tzanany


Sunday, July 13, 2014

WebSphere PMI – Performance monitor

WebSphere PMI – Performance monitor

General settings
Make sure PMI is enabled




In the above screen you can control which level of logs the PMI would monitor , basic-extended-all or custom were you can choose your own statistics set.
Basic overhead up to 2%
_ Extended overhead up to 3%
_ All overhead of up to 6%
_ Custom will depend on the counters enabled but it is reasonable to expect
somewhere between 2%-6%



Runtime monitor
Open the current activity
Choose the statiscs you want to see
Click on the view modules – to see the graph .
Note:

You can log to file all the results to see it after


If you want to log to file – you can control on the log files



To see the logs
Browse to the tpv file – and click on the ViewLog button .



Extra details – and links could be found here:



Tuning performance

 

WebSphere Application Server Performance Tuning Toolkit


enjoy 
Yaniv Tzanany

 






Wednesday, July 9, 2014

How to read proguard stack trace


in case you want to analyze call stack - that is obfuscated by proguard here is the way.

  1. Open /tools/proguard/bin/proguardgui.bat
  2. Select the “ReTrace” option on the left column.
  3. Add your mapping file and obfuscated stack trace. --- this is the mapping.txt file that we keep per version 
  4. Click “ReTrace!

here is a sample 


Yaniv Tzanany

Monday, June 23, 2014

Browser Testing performance tools

the next links are testing tools for browser , in case you want to compare them .

sunspider

octane-benchmark.googlecode

peacekeeper

enjoy
yaniv tzanany

Saturday, June 14, 2014

DroidCon TLV - 2014 - DAY 2

multi process tasks are complicated
all services and reciever are on the main threads .

thread is real parallel but expensive .... use thread pool where you can.
use intent service instead of servics.
disk access are expensive --- for shared preference you can use Apply method than commit to save in the background into the disk.

Future library for concurrency.
Guava library for extra extension and tools .
Gson - json to object from google.

Bug Repoerts:
bugsense  - > free for up to 500 report in month
ACRA  -> you might need your server code -- this tools will send it t you.
Google breakpad - you might need your server

FYI:
You can connect to OS temperature action.
In Settings-developers- cpu you can see which process are running and how much cpu they get.

Android studio is good also dealing with Google cloud endpoints .
use Api Explorer to watch google endpoints .

WebGl -- its the open gl for web.
for models you can use Clara.io or blender  studio.

androiddev101 good site

ROM Cooking 
https://thenewcircle.com/s/post/1609/tutorial_x86_rom_cooking_101_ron_munitz_video
or https://www.youtube.com/watch?v=7iLeBD33Fo0
http://source.android.com/

Hybrid app:
its possible to communicate with JS in web view with your native android code











Wednesday, June 11, 2014

DroidCon TLV - 2014 - DAY 1

short summery and pointers from this  event http://il.droidcon.com/2014/:

secured DB - http://sqlcipher.net/
Nokia X - (surprise me )  - run android 4.1.2 without the google services such as map , very easy to port app to nokia X - almost compatible .

Indie Development :

  • use cloud services - AWS , google engine,,, avoid your own server if possible 
  • release version asap
  • translate it to 7 language - increase download by 30%
  • remove unused features 
  • add rate us - button
  • app name - make it sense 
  • add share button 
  • add seo + facebook page + google plus with your app name 
  • extreanl links to your downlaod page 
  • in app - is the best for getting money or interstitial ads.
  • add analytics such as google  or flurry  .
tips:
you can run intent after the first run to know where you get the download from   search from com.android.vending.INSTALL_REFERRER .

do not use such passwords :


animated ui frameworks


Saturday, April 12, 2014

Android Video & media controller

Custom Android media controller | Brightec, Brighton, UK:



http://www.techotopia.com/index.php/Implementing_Video_Playback_on_Android_using_the_VideoView_and_MediaController_Classes


http://eagle.phys.utk.edu/guidry/android/playingVideo.html


Sunday, March 30, 2014

Android Library

We design and implement open intents and interfaces to make Android mobile applications work more closely together. We provide samples and free applications to demonstrate their usage.

OpenIntents - openintents - We define and implement useful open intents for the Android platform. - Make Android applications work together. - Google Project Hosting:


good one http://www.androidviews.net/


Friday, March 21, 2014

simbiose - utilities for android development

This a collection of utilities for android development, like Log Manager, Shared Preferences Management, SQLite management, Easy share, Key Key Map, Copy Assests easy, open documents with correct intent, decrypt & encrypt strings, Remote Image View and a lot of others littles things.

simbiose/SAU · GitHub:



'via Blog this'

Saturday, March 1, 2014

apk tools - framework-res sample

here is a sample of how to change the framework-res.apk file
___________________________ apk tools _______________________

if no framwrok

apktool  if framework-res.apk

else
apktool    d --frame-path C:\apk-tools\odex_deodex\my-framework framework-res.apk 

change your resource
copy the resources.arsc file from the original file
build it
apktool b  framework-res

goto framework-res/build/apk folder
copy the META-INF (sign stuff) from the original apk file into this location (framework-res/build/apk/META-INF)

run the command again
apktool b  framework-res

the new apk is ready to deploy

framework-res/dist/framework-res.apk

chmod 644 framework-res.apk

video could be found here

Wednesday, February 26, 2014

Android Beginners: NDK Setup Step by Step

Android Beginners: NDK Setup Step by Step « Mind The Robot:




MakeFile - Dependencies

you can find here some info about writing correct MakeFiles

http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_4.html


the option i was looking for is how to create depndency between files that exist in other projects.
the solution is to use VPATH in the makefile.

VPATH: Search Path for All Dependencies


enjoy 
Yaniv Tzanany



Monday, February 24, 2014

CCache - speed C++ compiler output

ccache is a compiler cache. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again. Supported languages are C, C++, Objective-C and Objective-C++.

to make it work on aix with xlC_r compiler  , i used the next steps:

i download the sources and compile them on aix via g++ compiler
i copied the output ccache program into my build machine.

i set the next environment to make support xlC_r compiler:
 export CCACHE_EXTENSION=i     (this tell the compiler to generate preprocessor file with i extension)


helper settings FYI:
export CCACHE_DISABLE=1   (to avoid using ccache)
export CCACHE_LOGFILE=/yaniv/ccachelog.log  (to see ccache log)


enjoy
Yaniv Tzanany


Know your BUGS for Android

ACRA - Know your BUGS.:

easy and simple - android-remote-stacktrace

Android-Error-Reporter


bugsense https://www.bugsense.com/

Sunday, February 16, 2014

android links stuff

"ToneGenerator "  - code that can help how to generate tones

GrepCode: com.android.phone.EmergencyDialer (.java) - Class - Source Code View:


android long press timeout

The default time out is defined by ViewConfiguration.getLongPressTimeout().

You can implement your own long press:

boolean mHasPerformedLongPress;
Runnable mPendingCheckForLongPress;

@Override
public boolean onTouch(final View v, MotionEvent event) {

    switch (event.getAction()) {
        case MotionEvent.ACTION_UP:

            if (!mHasPerformedLongPress) {
                    // This is a tap, so remove the longpress check
                    if (mPendingCheckForLongPress != null) {
                        v.removeCallbacks(mPendingCheckForLongPress);
                    }
                // v.performClick();
            }

            break;
        case  MotionEvent.ACTION_DOWN:
            if( mPendingCheckForLongPress == null) {
                mPendingCheckForLongPress = new Runnable() {
                    public void run() {
                        //do your job
                    }
                };
            }


            mHasPerformedLongPress = false;
            v.postDelayed(mPendingCheckForLongPress, ViewConfiguration.getLongPressTimeout());

            break;
        case MotionEvent.ACTION_MOVE:
            final int x = (int) event.getX();
            final int y = (int) event.getY();

            // Be lenient about moving outside of buttons
            int slop = ViewConfiguration.get(v.getContext()).getScaledTouchSlop();
            if ((x < 0 - slop) || (x >= v.getWidth() + slop) ||
                (y < 0 - slop) || (y >= v.getHeight() + slop)) {

                if (mPendingCheckForLongPress != null) {
                    v. removeCallbacks(mPendingCheckForLongPress);
                }
            }
            break;
        default:
            return false;
    }

    return false;
}

Search for Patent

here are some links to search for Patent

http://patentscope.wipo.int/search/en/search.jsf

http://www.new-tone.co.il/

http://www.google.com/patents 

http://worldwide.espacenet.com/advancedSearch?locale=en_EP

http://patft.uspto.gov/


good luck

yaniv tzanany

Saturday, February 15, 2014

View source from odex file

copy the framework directory from the android you get the odex file.

  • /system/framweork copy to D:\MyStuff\Android\odex_deodex\l5-framework


open cmd  - and run the next commnads
cd D:\MyStuff\Android\odex_deodex

java -jar baksmali-2.0.2.jar -d D:\MyStuff\Android\odex_deodex\l5-framework -x d:\temp\YouTube.odex
the generated file go-to out folder by default.

now lets convert the out folder to dex file :
java -jar smali-2.0.2.jar  -o classes.dex out

use dex2jar file to create jar file
d2j-dex2jar.bat D:\MyStuff\Android\odex_deodex\classes.dex
this will generate classes-dex2jar.jar


open the jar file via jd-gui program
jd-gui.exe and choose the jar file classes-dex2jar.jar

 and you can see the code !!!

helpful links
http://madteam.co/forum/tutorials/how-to-deodex-an-odex-file/
http://javakorea.blogspot.co.il/2013/09/odex-decompilation.html
http://forum.xda-developers.com/showthread.php?t=2345435

decompile & disassemble APKs - ROM changes

[TOOL] APK_OneClick - decompile & disassemble APKs - xda-developers: "A tool package to decompile & disassemble APKs (android packages)."


some info how to make ROM changes  (e.g CHANGING HARD KEY FUNCTION (REMAPPING BUTTON)

http://forum.xda-developers.com/showthread.php?t=1801690  - in the bottom.

Basic and Intermediate Development Guides (For Interested Devs) COLLECTION

Monday, February 10, 2014

Multi-touch in Android 2

very good tutorial for image  -  How to use Multi-touch in Android 2 | ZDNet:


here is a sample how to detect clicks
http://stackoverflow.com/questions/11374444/clicklistener-and-longclicklistener-on-the-same-button

nice thread - Multi-touch with multiple buttons is supported at Android 3.0 (google allow multitouch to go the multiple views) .


SDK :
Handling Multi-Touch Gestures

another good tutorial  Handling single and multi touch on Android- Tutorial

sample - Touch handling in Android


enjoy
Yaniv Tzanany


Wednesday, January 8, 2014

Saturday, January 4, 2014

android ImageView with Zoom and Scroll

this is a working solution i found
ImageView Zoom and Scroll:

you might need this library too , for compilation
https://github.com/sephiroth74/Android-Easing

enjoy

Thursday, January 2, 2014

android adb backup - restore commands

how to create a full backup of android - step by step instruction 

here are the command to tests

its intersting that they mention that full backup might change MAC address ,,, device id .... not sure if i understnd 

but its worth to try and make sure all the mobile are working after - make calls & connect to wifi & internet 

enjoy 
Yaniv Tzanany