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.
- 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.html. This includes the installation of the Android SDK with the proper API versions installed.
Xmake must be installed.
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.
- Within the directory where the SAP Mobile Platform SDK was installed, locate the file at AgentryToolkit\AgentryOpenUISDK\SMPAgentryClientFramework-Android-70.x.x.zip
Open the archive and extract the contents to an accessible location.
- Launch Android Studio, and select to navigate to the the build .gradle file under the project root directory.
- Select to open the Project Structure dialog.
Select SDK Location in the left pane, and set the
Android SDK Location and Android NDK
Location in the right pane.
(Optional) Set environment variables ANDROID_HOME and
ANDROID_NDK_HOME to the two paths above if
gradlew command line usage is needed.
- Select Preferences search for "HTTP Proxy" in the search bar on the top left. , and in
- Choose the Auto-detect proxy settings, and set the Automatic proxy configuration URL as http://proxy:8083 on the right pane.
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=230817.
For rebranding and/or resigning of the Agentry Client for Android devices, make changes to the resources in the AgentryAndroidClientResources project.