Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You are not required to perform any additional steps to configure the Android server as it is preconfigured in WSO2 EMM. This section provides information on how you can make the Android agent production ready.

...

Tip
titlePrerequisites
  • Ensure that you have configured the WSO2 EMM Jaggery apps to enroll and manage devices as explained under general server configurations.
  • Download Android Studio 1.2.3 or later.
  • WSO2 EMM supports devices on Android version 4.1.x to 5.0 (Android Jelly Beans to Lollipop).
  • If you are in a production environment, make sure to have the following ports open:
    • The ports to open are 5228, 5229 and 5230. GCM Firebase Cloud Messaging (FCM) typically only uses 5228, but it sometimes uses 5229 and 5230.
      GCM FCM does not provide specific IPs, so it is recommended to allow the firewall to accept outgoing connections to all IP addresses contained in the IP blocks listed in Google's ASN of 15169. 
    • 10397 - Thrift client and server ports
    • 8280, 8243 - NIO/PT transport ports

...

  1. Get a GIT clone of the Android Agent application from GitHub.

  2. Update the Android Software Development Kit with the following:

    • SDK Versions 22 and 16. 

    • Build Tools Version 22.0.1.

    • Install or update Android Support Library.

    • Install or update Google Play Services.

    • Install Google USB Driver, if you are on a Windows platform.

  3. By default, the Android agent communicates with the server through HTTP. For production, this needs to be changed to https, by configuring the following parameters in the Java class named Constants.java, which is in the org.wso2.EMM.agent.utils package: SERVER_PORT and SERVER_PROTOCOL.

    Anchor
    step3
    step3

    Panel

    For more information see below:

    Expand
    titleGenerating a BKS File

    Include Page
    Generating a BKS File for Android
    Generating a BKS File for Android

  4. The Android agent can't be built via the usual android developer SDK, as it requires access to developer restricted APIs. Therefore, you need to replace the existing android.jar file that is in the <SDK_LOCATION>/platforms/android-<COMPILE_SDK_VERSION> directory with the explicitly built android.jar file that has access to the restricted APIs. 
    You can get the new jar file using one of the following methods:

  5. Import the project on Android Studio, clean and build the project.

  6. Run the project on a device.

    Info

    The .apk file can be found in the < EMM_HOME>/repository/deployment/server/jaggeryapps/emm-web-agent/units/asset-download-agent-android/public/asset  directory.

What's next