To build the Android app for AEM Forms, perform the following steps in the recommended sequence.
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>.zip
package available on the Software Distribution.
To download the adobe-aemfd-forms-app-src-pkg-<version>.zip
file, perform the following steps:
The following image displays the structure of the adobe-lc-mobileworkspace-src-<version>.zip\android
folder.
Set the following environment variables before starting the build process for the AEM Forms app:
ANDROID_SDK_ROOT
system environment variable to the SDK location for Android. For example, C:\Users<username>\AppData\Local\Android\SdkPath
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.After you have saved the adobe-lc-mobileworkspace-src-<version>.zip file on the local file system and set the environment variables, build a standard AEM Forms Android app using any of the following options:
To build an AEM Forms app using Android Studio, perform the following steps:
Launch the Android Studio application on your machine.
Click Open an existing Android Studio project. If the dialog box to open an existing project does not appear automatically, select File > Open.
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.
Select android from the left pane and click Run > Run ‘android’.
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.
To generate the .apk file using Android Studio, do the following:
Launch the Android Studio application on your machine.
Select Open an existing Android Studio project. If the dialog box to open an existing project does not appear automatically, select File > Open.
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.
To generate the .apk file, select Build > Build APK.
Optionally, Select Build > Generate Signed APK to generate a signed version of the .apk file.
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