How to share look and feel with UX team early on

Here is a way you can show share visualization of your layout file with UX team.

1. Create only your layout file in Eclipse and click on Graphical Layout

2. Select correct device name, theme and API level by selecting the drop-down.

Selecting Device, Theme and API

3. Rick click first icon above and select “Add As Thumbnail….”

4. Now you will see your new file.

5. Right on the newly created thumbnail and click on “Export Screenshot…”

This newly created png can be shared with your UX team so they can give your early feedback on the layout.

Posted in android | Tagged , , , , , , , , | Leave a comment

How to add your own code into github

If you have your code which you want to add into github, here are the steps:

1. Create a repository in github with the same outer folder name as your existing directory which you want to add into github.

2. Add a .gitignore file into your outmost folder

3.$git init

You are now basically putting your code into local git control.

4. $git add

Now adding all your source code into local git.

5. $git commit -m “Message”

Committing code into local git

6. $git remote add origin

Tell your local git about remote git.

7. $git pull origin master

Sync your local and remotes, this is a merge, you will not loose your code.

8. $git push origin master

Now you code is gone into github, you should be able to see your code in the web interface of git.

After this step you should just follow your git add/git commit and git push.



You got error 403, edit .git/config change https to ssh. This is needed because git supports ssh and not https.

You get Permission denied, please follow instructions at this link.


Posted in Uncategorized | Tagged , , , | 1 Comment

Vi to Eclipse for Android App Dev

If you have been using vim it may be a bit daunting to switch to Eclipse for Android development. It is possible to avoid Eclipse all together and do the development with ant and command line version of adb, but the power and productivity improvement with Eclipse for Android development is simply too high to ignore. To demystify Eclipse here are a few points to remember.

1. Eclipse has a concept of Perspectives, which is collection of views.

2. It is possible to create your own perspective and save the same.

Now some key buttons for Android Development using Eclipse.


Posted in Uncategorized | Leave a comment

Playing with Android Emulator

If you want to do some funky stuff with emulator, here is a tip.

telnet into your android emulator by typing telnet localhost <port number of emulator> You will now be able to execute cool commands. The port number is shown on the title bar of your Android emulator after it gets fired up.

For e.g.

1. gsm call <from number>  This will cause your emulator to receive a call

2. power capacity 0, this will cause your emulator to run out of battery to start charging from 0., will show you many other commands you can play with.

Key board short-cuts for emulator can be found here





Posted in Uncategorized | Tagged , , | Leave a comment

Automate tests for an Android Application

monkeyrunner is a tool that automates tests with Android on an Emulator using a language similar to Python called Jython. So first step is to install Jython.

1. Install jython from here. (Ensure atleast Java 1.4.2 is on your machine)

2. java -jar jython_installer-2.5.2.jar which invokes the installer.

3. Write script in python and copy the same to the location ~/adt-bundle-mac-x86_64-20130917/sdk/tools or any other location provided PATH is set properly.

4. monkeyrunner

Here is an example script which install an apk.

#Author: Sateesh
from  import MonkeyRunner, MonkeyDevice

dev = MonkeyRunner.waitForConnection()

PS: Add jython and monkeyrunner to your PATH.

Posted in android, testing | Tagged , , , , , , | Leave a comment

Choosing the right remote test platform

Once the Android application is developed, the next step is to test on multiple devices. There are couple of ways it can be done.

1. Create emulator of the target devices. OR

2. Use Remote Labs, this has many options like DeviceAnywhere or PerfectoMobile or LessPainful.

All the above costs money, the cheapest being about 250 USD / month.

Alternately you can use Samsung’s Remote Lab. As per statistics of 2012, Samsung has the highest market share of 23%.


Samsung Remote Test lab can be access here.

Posted in Uncategorized | Tagged , , | Leave a comment

Stress Test Android Application

If you would like to see how your Android Application behaves when stressed, here is a simple way. The idea is use monkey, which is a tool available with SDK.

The steps are as follows:

1. Fire the emulator, download your apk, bring up the App.

2. $adb shell ( This will give you a shell access to your emulator device)

3. monkey -p <com.x.y> -v 500

(com.x.y) is your package name.

4. You will see monkey logs generated, and also crashes reported.

PS: You can enable adb logcat even before you start monkey test to get details of your crash.

Posted in testing | Tagged , , , , | Leave a comment