Wednesday, August 28, 2013

Speed up ADF Mobile Deployment to Android with Keystore and "Release" Packaging

As you might have noticed from my latest ADF Mobile entries, I'm doing most of my ADF Mobile development on a windows machine and testing on an Android device. Unfortunately the Android/windows experience is not as fast as the iOS/Mac one.
However, there is one thing I learned today that can make this a bit less painful in terms of the speed to deploy and test your application - and this is to use the "Release" mode when deploying your application instead of the "Debug" mode.
To do this you'll first need to define a keystore, but as Joe from our Mobile team showed me today, this is quite easy.
Here are the steps:
Open a command line in your JDK bin directory (I just used the JDK that comes with the JDeveloper install).
Issue the following command:
keytool –genkey –v –keystore <Keystore Name>.keystore –alias <Alias Name> -keyalg RSA –keysize 2048 –validity 10000
Both keystore name and alias names are strings that you decide on.
The keytool utility will then prompt you with various questions that you'll need to answer.

Once this is done, the next step is to configure your JDeveloper preferences->ADF Mobile to add this keystore there under the release tab:

 Then for your application specific deployment profile - switch the build mode from debug to release.

The end result is a much smaller mobile application (for example from 60 to 21mb) and a much faster deployment cycle (for me it is about twice as fast as before).


For even faster deployment on Android - deploy to a device instead of the emulator.
As for size of the apk file there is a minimum size of 9mb that is needed for the JVM. Frankly I don't think this is an issue for people on the store - angry birds is bigger than this and they didn't have any problems getting millions of users to download their application.

No comments:

Post a Comment