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).




Comments:

i am unable to run the keytool –genkey –v –keystore <Keystore Name>.keystore –alias <Alias Name> -keyalg RSA –keysize 2048 –validity 10000

as i do not see genkey as a valid option of keytool in my system. how to fix it?

Posted by Vik on February 04, 2013 at 11:07 PM PST #

Vik - I'm not sure why it doesn't work for you - make sure you are using JDK 6.
You can also try to use genkeypair instead of genkey.

Posted by Shay on February 05, 2013 at 09:59 AM PST #

Thanks !

Your post was very helpful !

Yossi

Posted by guest on May 03, 2013 at 04:01 AM PDT #

How to enable log in IOS ?

Posted by guest on May 06, 2013 at 10:46 AM PDT #

Hi, I did this and in fact it was 50% faster, but still takes a little longer than android and eclipse, plus de apk size is way to big, How can we put it in the market with such size, is there another way? thanks!!

Posted by guest on May 09, 2013 at 10:15 PM PDT #

Guest - 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.

Posted by Shay on May 10, 2013 at 10:35 AM PDT #

Hi vik,

I am also getting same problem ûgenkey is that not a legal command.

how to resolve..

Posted by guest on September 11, 2013 at 07:17 AM PDT #

guest - this will depend on the JDK version you are using.

Posted by Shay on September 11, 2013 at 03:44 PM PDT #

use this command
keytool -genkey -v -keystore <Keystore Name>.keystore -alias <Alias Name> -keyalg RSA -keysize 2048 -validity 10000
this problem for "-" use from above code or type again all "-"

Posted by guest on November 07, 2013 at 07:45 AM PST #

Hi, thanks for this valuable information. After trying this, the deployment time reduced from more than 40 minutes to just 5 minutes.

Thanks a lot. Cheers!!

Posted by Jignesh Koshti on February 02, 2014 at 11:17 PM PST #

Post is truly helpful.

Posted by guest on February 19, 2014 at 10:48 PM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today