How To Setup Your Development Workspace

You need to download and install the Android SDK, download Eclipse, download and install the Eclipse ADT. Links: Download Android SDK: http://developer.android.com/sdk/index.html Installling Android SDK: http://developer.android.com/sdk/installing.html Download...

How To Calculate The MD5 Hash

As you know, you shouldn’t store passwords and other sensitive data in plain text. A good approach is to store the data’s MD5 hash. public static String calcMD5(String s) { try { MessageDigest digest = java.security.MessageDigest.getInstance("MD5");...

How To Check If App Is Debuggable

This is useful to add logs, unlock levels, bypass security checks and other stuff only when the app is debuggable. This way, you don’t need to remove or comment code when you publish your app. public static boolean isDebuggable(Context context, String...

How To Check If Market Is Installed

Some devices don’t have a market application installed, if you try to open it without checking if it exists, you might get a Force Close! If there is any market application installed on the device, you can: ask for ratings/stars ask for comments redirect users...

How To Change Layout Attributes Automatically

This is very useful to change attributes automatically, without having to change them one by one manually. Examples: change the Color of all TextViews in a Layout change the TypeFace of all TextViews in a Layout change the Background of all Buttons in a Layout change...

How To Improve SoundPool Performance

I had a few performance issues while using SoundPool. Everytime I played a sound, the frame rate dropped. This is absolutelly inadmissible for games requiring a high FPS rate. I’m using *.ogg files and the SoundPool initialization is done during the game...