Build the AEM Forms Android app build-the-aem-forms-android-app

CAUTION
AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our technical support periods. Find the supported versions here.

Perform the following steps in the recommended sequence to build the Android app for AEM Forms.

Download the AEM Forms App Source Code Package download-android-zip

AEM Forms App Source Code Package refers to the adobe-lc-mobileworkspace-src-<version>.zip archive. This archive includes the source code required to build a custom AEM Forms app. The archive is included in the adobe-aemfd-forms-app-src-pkg-<version>.zippackage available on the Software Distribution.

Perform the following steps to download the adobe-aemfd-forms-app-src-pkg-<version>.zip file:

  1. Open Software Distribution. You require an Adobe ID to log in to the Software Distribution.

  2. Tap Adobe Experience Manager available in the header menu.

  3. In the Filters section:

    1. Select Forms from the Solution drop-down list.
    2. Select the version and type for the package. You can also use the Search Downloads option to filter the results.
  4. Tap the package name applicable to your operating system, select Accept EULA Terms, and tap Download.

  5. Open Package Manager and click Upload Package to upload the package.

  6. Select the package and click Install.

  7. To download the source-code archive, open https://<server>:<port>/crx/de/content/forms/mobileapps/src/adobe-lc-mobileworkspace-src-<version>.zip in your browser. The Android app .zip file is downloaded on your device.

  8. Extract the contents of the .zip file to a folder on your local file system. For example, C:\Folder Structure\adobe-lc-mobileworkspace-src-2.4.20

The following image displays the structure of the adobe-lc-mobileworkspace-src-<version>.zip\androidfolder.

zip_android_folder_structure

Set the environment variables set-environment-variable-android

Set the following environment variables before starting the build process for the AEM Forms app:

  • Set the JAVA_HOME environment variable to the location of JDK software on the local file system. For example, C:\Program Files\Java\jdk1.8.0_181
  • Set the ANDROID_SDK_ROOT system environment variable to the SDK location for Android. For example, C:\Users\username\AppData\Local\Android\Sdk
  • Set the Path system environment variable to include the platform-tools and tools folder locations for Android. For example, C:\Users\username\AppData\Local\Android\Sdk\platform-tools and C:\Users\username\AppData\Local\Android\Sdk\tools.

Build standard AEM Forms app set-up-the-xcode-project

Once you have saved the adobe-lc-mobileworkspace-src-<version>.zip file on the local file system and set the environment variables, build standard AEM Forms Android app using any of the following options:

Build AEM Forms app using Android Studio using-android-studio

Perform the following steps to build AEM Forms app using Android Studio:

  1. Launch the Android Studio application on your machine.

  2. Click Open an existing Android Studio project. If the dialog box to open an existing project does not appear automatically, select File > Open.

  3. Navigate to adobe-lc-mobileworkspace-src-<version>.zip/android on the local file system and click OK.

    The android option is displayed in the left pane.

    android_folder_studio

  4. Select android from the left pane and click Run > Run ‘android’.

  5. Select the Android device from the Connected Devices section on the Select Deployment Target dialog box and click OK.

    Once you have built the development environment successfully, you can now apply customizations on the app. Use the following articles to customize the app:

    After applying appropriate customizations to your app, you can generate the .apk file for distribution.

Generate .apk file using Android Studio generate-apk-android-studio

Execute the following steps to generate the .apk file using Android Studio:

  1. Launch the Android Studio application on your machine.

  2. Select Open an existing Android Studio project. If the dialog box to open an existing project does not appear automatically, select File > Open.

  3. Navigate to adobe-lc-mobileworkspace-src-<version>.zip/android on the local file system and click OK.

    The android option is displayed in the left pane.

  4. Select Build > Build APK to generate the .apk file.

    Optionally, Select Build > Generate Signed APK to generate a signed version of the .apk file.

Use Android Debug Bridge build-android-debug-bridge

Once the .apk file has been generated, execute the following command to install the application on an Android device using the Android Debug Bridge.

Windows users: adb install %HOMEPATH%\Projects\[your-project]\adobe-lc-mobileworkspace-src-[version]\android\build\outputs\apk\android-debug.apk

MAC users: adb install [User_Home]/Projects/[your-project]/adobe-lc-mobileworkspace-src-[version]/android/build/outputs/apk/android-debug.apk

recommendation-more-help
a6ebf046-2b8b-4543-bd46-42a0d77792da