Posts

Showing posts from July, 2012

How to create android 4 ICS emulator UI in tablet mode instead of phone mode?

Till now I was developing android application for Android 2.3.3. Now, I have started development for Android 4.0.* ICS (Ice scream Sandwich) version. I created new Android 4.0.3 image using AVD manager targeting API Level 15. Emulator runs but UI is in phone mode instead of tablet mode.

After some investigation I found following solution:
Step1: Goto AVD Manager.
Step2: Select Android 4.* AVD image.
Step3: Click Edit button on right side in AVD Manager UI.
Step4: Change skin type from "Default (WVGA800)" to "WXGA800" or WXGA720. (which ever resolution works for you)
Step5: Click Edit AVD button.
Step6: Start your Android 4.* emulator. This time you should see Android tablet like emulator UI.

References:
http://stackoverflow.com/questions/9917793/how-to-run-android-emulator-as-a-tablet-mode

How to use keytool in java to generate key store to use MapView in Android?

Android MapView needs a MD5 key to access Google Maps on Android device or emulator. To do that we need to generate key store using java toolkit's keytool.exe.

Following command shows how to generate key store using keytool:
Command: C:\Program Files\Java\jdk1.6.0_30\bin>keytool -genkey -alias android -keyalg RSA -keystore <keystre.jks-path> -keysize 2048 -keypass <password>

For above command you can you JDK 1.6 or JDK 1.7. I tried the command with both versions.

How to find the MD5 key store if you have already generated it in past?
Command: keytool -list -v -keystore <keystore path>

Above command will ask you for that password. Provide the password you used to generate the key store. If you are using JDK 1.7 then don't forget to mention "-v" in above command otherwise you will get "SHA1" key only as output.

Issues faced:
1. I noticed in few post people mentioned that use keytool.exe from JDK 1.6, using JDK 1.7 key tool generates key s…

Why do I get debug certificate expired error when I debug Android app from Eclipse?

When I ran my Android app from eclipse IDE I got "Error generating final archive: Debug certificate expired" error at the console. I investigated on net and found following solution for the issue:

Step1: Goto "C:\Users\<user-name>\.android" (In fixed in Windows 7)
Step2: Delete "debug.keystore" file there or delete your debug certificate under ~/.android/debug.keystore on Linux and Mac OS X.
Step3: The Eclipse plugin should then generate a new certificate when next time you try to build a debug package. You may need to clean and then build the project to generate the certificate.

The self-signed certificate used to sign your application in debug mode (the default on Eclipse/ADT and Ant builds) will have an expiration date of 365 days from its creation date.

Note:You cannot release your application to the public when signed with the debug certificate.

References:
http://developer.android.com/tools/publishing/app-signing.htmlhttps://groups.google.com/…