Thursday, May 30, 2013

Setup ADF Mobile on Android For Release Mode


Props go to Shay and Joe with the ADF Team at Oracle for this post.

If you have begun developing mobile apps with ADF Mobile on Windows, you have already begun deploying onto the Android Emulator and/or a physical Android Device on hand. To speed up the deployment process and overall performance of the ADF Mobile app, deploy your apps using Release Mode. Overall, you'll never get the android emulator to run like a physical device or like the iOS emulator, but you can improve the performance of apps by deploying them in Release Mode.

Below are steps to get your Android Apps running in Release mode (developed on a Windows PC). Essentially, you'll be creating a self-signed certificate with Java's keytool command and deploying apps based on your self-signed certificate.


  1. Open your command-line utility on Windows.
  2. Add the %JDK_Home%/bin directory to the front of your PATH environment variable.
    Note: the JDK Home should be the JDK Home which your JDeveloper is using.
  3. cd to a directory where you want store your self-signed certificate. I put it in the JDeveloper Home, for example C:\Oracle\JDeveloper
  4. Enter the following command to generate a self-signed certificate:
    keytool -genkey -v -keystore %Keystore_Name%.keystore -alias %Alias_Name% -keyalg RSA -keysize 2048 -validity 10000

    Replace %keystore_name% with the a

    ctual filename that you want to specify for the keystore
    Replace %Alias_Name%  with the alias name you want to specify. Since it's a self-signed certificate, you can name this whatever you want.
  5. You'll be prompted to specify keystore passwords and additional certificate fields. When you're prompted to enter an alias-key password, just hit enter to have the alias-key password setup to be the same as your keystore password (It keeps things simple).
    See the example below.

  6. Open your JDeveloper. Go to Tools > Preferences. Go to the ADF Mobile > Platforms configuration screen. Click on the Release Tab. Make the following configurations:
    Keystore Location: Specify your keystore file's location in Keystore
    Keystore Password: Specify your password
    Key Alias: Specify your key-alias
    Key Password: If you hit enter when prompted to enter a alias-key password and didnt enter any values, use the Keystore Password value. Otherwise, enter what you put for hte alias-key password.

  7. Go to your Mobile Application's Deployment Profile Properties window. Click on Android Options. Switch Build Mode from Debug to Release. Click OK to apply your changes.

  8. Deploy your app!

This concludes the end of another post. Keep ADF'ing!

1 comment:

  1. Thanks this helped.Was trying to follow few other posts for this but was running into issues

    ReplyDelete