This documentation is for WSO2 IoT Server 3.0.0. View the documentation for the latest release.
Due to a known issue do not use JDK1.8.0_151 with WSO2 products. Use JDK 1.8.0_144 until JDK 1.8.0_162-ea is released.
Page Comparison - White Labeling WSO2 Android App Catalog (v.2 vs v.3) - IoT Server 3.0.0 - WSO2 Documentation

Versions Compared

Key

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

Table of Contents
maxLevel3
minLevel3

Prerequisites 

  1. Download and install Android Studio.

    Info

    For more information, see installing Android Studio.

  2. WSO2 IoT Server supports API levels 16 to 23. Therefore, install the Android API levels 16 to 23 on Android Studio:
    1. Open Android Studio.
    2. Click SDK Manager.
    3. Click the SDK Platform tab and select the 16 and 23 API levels.
    4. Click Apply.

Changing Android app catalog related logos and icons

  1. Download the Android agent source code. The folder will be referred to as the <ANDROID_AGENT_SOURCE_CODE> throughout the documentation.

  2. Navigate to the <ANDROID_AGENT_SOURCE_CODE>/app_catalog/app/src/main/res directory.

    1. Navigate to the mipmap-xxhdpi folder and change the ic_launcher.png ( 144px X 144px ) file in order to change the icon. For more information, go to the Android icon guide.
    2. Navigate to the drawable-xxhdpi/ folder, and change the following file logos in order to change the header logos:

      ic_logo.png  ( 240px X 72px )
      repeat_bg.png   ( 277px X 125px )
    3. Navigate to the mipmap -xhdpi/ folder, and change the ic_launcher.png ( 96px X 96px ) file to change the application icon.
    4. Navigate to the  drawable-xhdpi/ folder, and change  the ic_logo.png (267px X 48px), and repeat_bg.png (222px X 100px) file in order to change the logos.
    5. Navigate to the mipmap-hdpi/ folder, and change the ic_launcher.png (72px X 72px) file in order to change the icon.

    6. Navigate to the drawable-hdpi/ folder, and change the ic_logo.png (200px X 36px), and repeat_bg.png (122px X 55px) files in order to change the logos.

    7. Navigate to the mipmap-mdpi/ folder, and change the ic_launcher.png (48px X 48px) file to change the icon.

    8. Navigate to the drawable-mdpi/ folder, and change the ic_logo.png (133px X 24px) file in order to change the logos.

  3. Open the <ANDROID_AGENT_SOURCE_CODE>/app_catalog directory via Android Studio.
  4. Build the project to create a new APK with the changes.

    Info
    Expand
    titleClick here for more information on building the project.
    Note

    Support for the Android Developer Tools (ADT) in Eclipse is ending. Therefore, you should migrate the app development projects to Android Studio. For more information on transitioning to Android Studio, see Migrating to Android Studio.

    1. Download the Android agent source code.

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

      • SDK Versions 23 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
      IoTS310:Generating a BKS File for Android
      IoTS310:Generating a BKS File for Android

    4. Import the projectonAndroid Studio, clean and build the project.

    5. Run the project on a device.

      Info

      The .apk file can be found in the <IoT_HOME>/core/repository/deployment/server/jaggeryapps/android-web-agent/app/pages/mdm.page.enrollments.android.download-agent/public/asset directory.

  5. Publish the built APK to your app store via the WSO2 App Manager publisher.

    Info

    For more information, see Creating an Android Application or Creating a New Version of the Mobile Application.