您查看的帮助内容对应的版本是:

AEM Forms provides the complete source code of the AEM Forms app app. The source contains all components to build a custom AEM Forms app. The source code archive, adobe-lc-mobileworkspace-src-<version>.zip is a part of the adobe-aemfd-forms-app-src-pkg-<version>.zip package on package share.

注意:

If you already have the source code archive, adobe-lc-mobileworkspace-src-<version>.zip, you can ignore the steps listed below and directly go to Build standard AEM Forms app.

To get the AEM Forms app source, perform the following steps:

  1. Navigate to package share
    URL: http://<server>:<port>/crx/packageshare.
  2. Download the source package. When you download the package, it is added in your AEM Forms package manager.
  3. After it is downloaded, navigate to: http://<server>:<port>/crx/packmgr/index.jsp, and install adobe-aemfd-forms-app-src-pkg-<version>.zip.
  4. To download the source-code archive, open http://<server>:<port>/crx/de/content/forms/mobileapps/src/adobe-lc-mobileworkspace-src-<version>.zip in your browser. 
    The source package is downloaded on your device.

The following image displays the extracted contents of the adobe-lc-mobileworkspace-src-<version>.zip.

Extracted contents of the zipped Android source

The following image displays the directory structure of the android folder in the src folder.

Directory structure of the android folder in src

Build standard AEM Forms app

  1. Perform the following steps to set up a project in Eclipse and provide a signing identity:

    Log in to a machine that has Eclipse and ADT installed and configured.

  2. Copy the downloaded adobe-lc-mobileworkspace-src-<version>.zip archive to:

    For MAC users: [User_Home]/Projects

    For Windows users: %HOMEPATH%\Projects

  3. Extract the archive in the following directory:

    For MAC users: [User_Home]/Projects/[your-project]

    For Windows users: %HOMEPATH%\Projects\[your-project]

  4. Launch Eclipse that comes with ADT bundle.

    Default location:

    For MAC users: Default location is Applications/ADT/eclipse/Eclipse. If the ADT is installed in any other location, update the local.properties file present in the [User_Home]/Projects/[your-project]/src/android folder and point the sdk.dir variable to ADT SDK location on your desktop.

    For Windows users: Update the local.properties file present in the %HOMEPATH%\Projects\[your-project]\src\android folder and point the sdk.dir variable to ADT SDK location on your desktop.

  5. Import Google Play Services library and the AEM Forms app project in your workspace.

    Importing Google Play Services library

    1. On the File menu, choose the Import option.

      The Import dialog is displayed.

    2. In the Import dialog, choose General > Existing Projects into Workspace, and click Next.

    3. In the Import Projects dialog, import android/thirdparty/google-play-services_lib into the workspace.

      Enter or select the root directory of the project that you want to build in the Root Directory text box:

      For Mac users: [User_Home]/Projects/[your-project]/src/android/thirdparty/google-play-services_lib

      For Windows users: %HOMEPATH%\Projects\[your-project]\src\android\thirdparty\google-play-services_lib

      Import Google play services library in the project
      Importing Google Play Services library

      Import google play services library from the third party folder
      Google play services library under Android folder structure

    4. Click Finish to build the project.

      Package explorer in Eclipse after importing Google Play Services
      Package explorer in Eclipse after importing Google Play Services

    Importing the AEM Forms app project

    Repeat steps 1-4, and perform the following steps:

    1. On the File menu, choose the Import option.

      The Import dialog is displayed.

    2. In the Import dialog, choose Existing Android Code into Workspace in the General folder, and click Next.

    3. In the Import Projects dialog, import android/aemformsapp into the workspace.

      Enter or select the root directory of the project that you want to build in the Root Directory text box:

      For Mac users: [User_Home]/Projects/[your-project]/src/android/aemformsapp

      For Windows users: %HOMEPATH%\Projects\[your-project]\src\android\aemformsapp

      Importing AEM Forms app project
      Importing AEM Forms app project

      AEM Forms app project under Android folder
      AEM Forms app project under Android folder

  6. Click Finish to build the aemformsapp project.

    The aemformsapp project is available in the ADT Project Explorer.

    eclipse project after building the app
  7. In the ADT Project Explorer, select the project (aemformsapp) and click the Project menu.

  8. In the Project menu, choose Build Project.

    The aemformsapp.apk installer file is created in the bin directory.

After you have built the project, you can choose to install the app:

  • Using Android Debug Bridge
  • Using Eclipse

Using Android Debug Bridge

You can install the application on an Android device via the Android Debug Bridge with the following command:

For MAC users: adb install [User_Home]/Projects/[your-project]/src/android/bin/aemformsapp.apk

For Windows users: adb install %HOMEPATH%\Projects\[your-project]\src\android\bin\aemformsapp.apk

Using Eclipse

Alternatively, you can install the application on an Android device using Eclipse.

  1. Connect the Android device to the computer on which you have built the project.

  2. In the ADT Project Explorer, right-click on the project (aemformsapp).

    adt-run-as-menu
  3. From the context menu, choose Run As -> Android Application.

    The Android Device Chooser dialog is displayed.

    chooser-dialog
  4. In the Android Device Chooser dialog, select the Android device on which you need to install the app and click OK.

本产品经 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License 许可  Twitter™ 与 Facebook 中的内容不在 Creative Commons 的条款约束之下。

法律声明   |   在线隐私策略