Skip to main content

Posts

Showing posts from November, 2015

Marshmallow, DOZE , Android DOZE

Marshmallow DOZE feature : What is this !!!  Every major Android version brings lots of good stuff ( Let me focus only on positive energies in this article -;) ) and this time in Marshmallow DOZE feature. Google finally serious about battery performance.   DOZE = Saving your device battery performance when device is not active or in other words when it meets certain criteria.  Is this the first we have feature like this in Android phones ? Nope not at all, almost every OEM spent lots of time and resources improving battery performance.  Sony Mobile XPERIA : "Stamina Mode" has been around for couple of years and i think they need to retire that feature as DOZE and Stamina Mode conflicts and achieves similar goals.  This frustrates OEMs given they spend time and resource and google delivers it later stage of the game.  In a nutshell,  Android M includes new functions, Doze and App Standby, to improve battery life. What does it means to Applications:  

Android ANR Time, UI Thread

Useful Android Performance / Stability debugging info  1. ANR Waiting times: Performing heavy I/O , Network access or orher heavy operations on UI thread ?? A BIG NO NO ..you are inviting ANR.   No response to an input event (such as key press or screen touch events) within 5 seconds. A  BroadcastReceiver  hasn't finished executing within 10 seconds.

Andoird Key codes , adb keyevent

Useful Android Keyevents inputs: Some time it is extremely useful to send keyevent via adb for automation and other purposes. #adb shell  #input usage: input [text|keyevent] input text input keyevent adb shell input text "HELLO" LIST OF KEY CODES:  1 --> "KEYCODE_MENU" 3 --> "KEYCODE_HOME" 4 --> "KEYCODE_BACK" 19 --> "KEYCODE_DPAD_UP" 20 --> "KEYCODE_DPAD_DOWN" 21 --> "KEYCODE_DPAD_LEFT" 22 --> "KEYCODE_DPAD_RIGHT" 23 --> "KEYCODE_DPAD_CENTER" 24 --> "KEYCODE_VOLUME_UP" 25 --> "KEYCODE_VOLUME_DOWN" 26 --> "KEYCODE_POWER" 27 --> "KEYCODE_CAMERA" 28 --> "KEYCODE_CLEAR" 55 --> "KEYCODE_COMMA" 56 --> "KEYCODE_PERIOD" 57 --> "KEYCODE_ALT_LEFT" 58 --> "KEYCODE_ALT_RIGHT" 59 --> "KEYCODE_SHIFT_LEFT" 60

ADB MAC

Add ADB PATH for MAC ( For those new to mac this is for you ) Assumptions : You installed android sdk and anroid studio. Total control version : in your terminal, navigate to home directory  i.e. /Users/username/ cd create file .bash_profile touch .bash_profile open file with TextEdit open -e .bash_profile insert line into TextEdit export PATH=$PATH:/Users/ username /Library/Android/sdk/platform-tools/ save file and reload file source ~/.bash_profile check if adb was set into path adb version One liner version Echo your export command and redirect the output to be appended to .bash_profile file and restart terminal. (have not verified this but should work) echo "export PATH=$PATH:/Users/ username /Library/Android/sdk/platform-tools/ sdk/platform-tools/" >> ~/.bash_profile