Follow the steps below to create the required certificate file and to learn how set up your Android app, test it, and submit it to Google Play. You can create an .apk app that you can submit to the Google Play Store.

For information about building the Android app, see Build Android apps (AEM Mobile).

 

Create a certificate file

Android systems require that all installed applications are digitally signed with a p12 certificate in which the private key is held by the application’s developer. Make sure that all applications are signed. The system can't install an application that is not signed. You can use self-signed certificates to sign your applications. No certificate authority is needed.

It's necessary that the certificate you create expires after October 22 2033.

Several methods for creating certificates are available, including Adobe Flash Professional and Adobe Flash Builder. If you don’t have any developer tools installed, you can use the Keytool utility to create a certificate. Keytool is a Java SDK utility that is already available on Mac OS computers. In Windows, it's necessary to install and configure Java SDK (also called JDK).

The following instructions tell you how to use Keytool to create a certificate. For detailed information, see Signing Your Application on the Android Developers site.

(Mac OS) Create a certificate file using Keytool

  1. Open Terminal, which is located in the Applications > Utilities folder.
  2. Copy and paste the following line (replace “myname.key.p12” and "alias_name" with your information):

    keytool -genkey -v -keystore myname.key.p12 -alias alias_name -keyalg RSA -keysize 2048 -storetype pkcs12 -validity 10000

    Specifying “10000” sets the expiration date after October 22 2033.

  3. Enter and reenter a password. You specify this password later when signing the app.

  4. Follow the prompts to specify the certificate information.

    Follow the prompts to specify the certificate information
  5. When prompted to confirm choices, enter yes, and then press Return to use the same password.

    A certificate is created in your prompt location, such as your user name folder. Copy this certificate file to a known location, and save a backup copy. Write down the password as well.

(Windows) Create a certificate file using Keytool

  1. Download and install Java SDK (JDK). Note the install location.
  2. (Optional) Set a permanent path to run Java SDK commands. Setting a permanent path lets you type JDK commands such as “keytool” from any path. That way, you don’t have to navigate to the Java SDK directory. To set a permanent path, see step 4 of the JDK site.
  3. Open a command prompt. For example, enter “command” in the Run field or the search field.
  4. If you did not set a permanent path in step 2, navigate to the directory where JDK commands are located. For example, type cd \ and then type cd program files\Java\jdk1.6.0_24\bin (specify the correct version number).
  5. Type (or paste) the following line (replace “myname.key.p12” and "alias_name" with your information):

    keytool -genkey -v -keystore myname.key.p12 -alias alias_name -keyalg RSA -storetype pkcs12 -keysize 2048 -validity 10000

    Specifying “10000” sets the expiration date after October 22 2033.

  6. Enter and reenter a password. You specify this password later when signing the app.

  7. Follow the prompts to specify the certificate information.

    Follow the prompts to specify the certificate information

    A certificate is created in your prompt location, such as your user name folder. Copy this certificate file to a known location, and save a backup copy. Write down the password as well.

    Note: If a certificate file is not created, replace “-keystore myname.keystore” with a target path (such as -keystore c:\users\bob\bobcert.keystore) that you have access to.

     

Set up in-app products (Google Play)

You can use Google's In-app product service (also called "in-app billing") to sell collections within your app. Google Play subscriptions are not supported at this time.

Make sure that you set up your billing before you make your content available to customers.

For information on Google Play app pricing, see Selling Your Apps in Google Play Help.

  1. Use the Google Play developer site to create an app request and to upload your custom viewer (.apk) app.

    • If your app includes in-app products, Google Play now requires you to upload the app (.apk file) using the Beta Testing tab in the APK section.
    • While submitting your final app, click Save instead of publish if you don't yet want your app in the store before you set up your in-app billing.
  2. Follow the steps in the Administering In-app Billing Help topic. As you go through these steps, note the following:

    • Specify the exact same In-app Product ID when setting up Android in-app billing that you use for the collection's Product ID. The Product ID ties the collection to the in-app billing item.
    • For Purchase Type, select "Managed," not "Unmanaged." Otherwise, your customers can't restore purchases.
    • Adobe does not support the Android Refund feature at this time.
    • Note the "License Key" information. Adobe needs this information (also referred to as "shared secret") to enable in-app billing, as described in the next step.
  3. In the Google Play Developer site, navigate to the "Services & APIs" section of the app. Copy the long string of characters under "Your License Key for This Application." In the On-Demand Portal, navigate to the Store section of project settings, and paste the license key value into the "Google Play Shared Secret" field.

Load the .apk file onto your Android device

Your Android tablet or phone requires Android 4.4 or later.

  1. Allow your device to install non-Market applications. For example, on a Samsung Galaxy, go to Settings > Applications and select Unknown sources. When you finish installing, you can deselect this option again.
  2. Attach your device to your computer. If necessary, mount the device so that you can open the folder to view the files. If you cannot view the device on your computer, see Android File Transfer.
  3. Open a file manager app (such as Dropbox), and install your .apk file.

Submitting the app to Google Play

1. Use the signing tool to sign the .apk file. See Signing iOS and Android apps for AEM Mobile.

2. Sign in to the Google Play Developer Portal and submit the signed .apk file to Google Play Store.

If your app includes retail in-app purchases, make sure that you specify the shared secret (license key) in the Store tab of project settings.

Make sure that you submit a beta APK file in the Google Play Developer Portal.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy