Developer

Agentry OpenUI for Android Project Setup

This procedure describes how to set up an Android Studio development environment that can be used to develop customer controls using the SAP Agentry OpenUI SDK for Android clients,and to rebrand Agentry Client for Android. Android Studio is a gradle-based IDE that provides additional Android-specific features which facilitates the app building/debugging process. Agentry Client is built using Gradle.

Prerequisites

Before you start:
  • The SAP Mobile Platform SDK must be installed, with the Agentry Toolkit being one of the selected components during installation.
  • The supported version of Android Studio must be downloaded, and installed: https://developer.android.com/studio/index.htmlInformation published on non-SAP site. This includes the installation of the Android SDK with the proper API versions installed.
    • API 23

    • API 19

  • Xmake must be installed.

Context

When this procedure is complete, a series of development projects will exist in Android Studio that will allow you to develop customer controls, rebrand the Agentry Client for Android, and ultimately produce a new application package (.apk file) for distribution to Android devices.

Procedure

  1. Within the directory where the SAP Mobile Platform SDK was installed, locate the file at AgentryToolkit\AgentryOpenUISDK\SMPAgentryClientFramework-Android-70.x.x.zip
  2. Open the archive and extract the contents to an accessible location.
  3. Launch Android Studio, and select Start of the navigation path File Next navigation step Open End of the navigation path to navigate to the the build .gradle file under the project root directory.
  4. Select Start of the navigation path File Next navigation step Project Structure End of the navigation path to open the Project Structure dialog.
  5. Select SDK Location in the left pane, and set the Android SDK Location and Android NDK Location in the right pane.
    • SDK:

      /Users/<user_ID>/.xmake/tools/com.google.download.android/android-sdk-macosx/24.4/android-sdk-macosx
    • NDK

      /Users/<user_ID>/.xmake/tools/com.google.download.android/android-ndk/r13b/android
  6. (Optional) Set environment variables ANDROID_HOME and ANDROID_NDK_HOME to the two paths above if gradlew command line usage is needed.
  7. Select Start of the navigation path Android Studio Next navigation step Preferences  End of the navigation path, and in Preferences search for "HTTP Proxy" in the search bar on the top left.
  8. Choose the Auto-detect proxy settings, and set the Automatic proxy configuration URL as http://proxy:8083 on the right pane.

Results

Once this is complete, the development environment for the Agentry Client for Android has been created. To develop custom controls using the OpenUI SDK, create all extension classes in the AgentryAndroidClientSolution project, within the package com.sap.mobile.platform.client.openui.extensions.

For debugging or running the Android client in Android Studio, you must comment out the first line "assembleRelease.dependsOn createBrandingArchive" in the build.gradle file, inside the afterEvaluate block of the AgentryAndroidClient module. This is due to an Android Studio bug introduced in 2.2.2 that is described in: https://code.google.com/p/android/issues/detail?id=230817Information published on non-SAP site.

For rebranding and/or resigning of the Agentry Client for Android devices, make changes to the resources in the AgentryAndroidClientResources project.