Archive for category Coding

Android Forensics

sansI have been doing a feasibility study for a client on how to remotely obtain various kinds of phone state for instances where their end-users needs customer support.

In doing so, I came across an interesting site on Android Digital Forensics. There’s some open source code that uses the many ContentProviders to extract information from the phone.

Android Market API

androidmarketapiI have been investigating how to gain programmatic access to the Android Market. There’s no official API but obviously it’s possible because of the many Android app catalog web sites.

There’s a useful (but incomplete) Java implementation called android-market-api as well as an article on how to download market applications without the vending app.

Also, don’t forget, on the phone you can simply reference an application using the following link for the following form:

market://search?q=pname:com.simonjudge.database

(obviously change to point to your app)

Android Image Processing

If you are thinking of doing some image processing on Android, you might like to take a look at Michael Wells  report (pdf) on image processing on Android. It benchmarks some common image processing functions (sobel, addition, convolution and threshold) and provides some sample code.

It shows that’s it’s possible to do simple image processing under Java without resorting to using the NDK.

Game Source Code

replicaislandIf you are developing or thinking of developing an Android game then you should take a look at Replica Island.  It’s a side scrolling platform game with full source code including all artwork and level layouts.

Including Android Built-in Icons in Your Application

screamingpenguinScreaming Penguin’s Android R Drawables site provides a great listing of the icons and graphics built into the Android OS. It’s easy to include the built-in drawables in your application by referencing them in code using something like…

android.R.drawable.ic_menu_edit

or in xml:

android:icon="@android:drawable/ic_menu_edit

There’s also a alternative list for Android 1.5 and an application if you wish to list the icons yourself.

However, be cautions…

1) The Screaming Penguin’s Android R Drawables has recently been updated to show Android 2.0 icons. Not all the icons are in 1.5 and 1.6 so if you include any, test  you can compile under the earliest SDK you wish to support (probably 1.5 at the moment). There’s also no guarantee that icons will remain in future versions of the OS but obviously the ‘common’ ones will always be there. Android Developers site  lists those that are officially usable. Note also that the “actual appearance of standard icons may change across platform versions”.

2) The drawables might change in appearance in future operator branded versions of the OS. This could be a good or a bad thing if you have referenced the built-in drawable. Good if you want your app appearance to change to be similar to the (branded) phone but bad if you have inter-mixed your own icons which will then look different.