Integrate the Android SDK for MXO in your App

Before you can deploy the integration, you must ensure the SDK is set up with the correct configuration parameters.

You can download the latest SDK and review the extended integration instructions from Github:

Android SDK for MXO

Minimum API Level

The minimum supported API level is API 21 (Android 5). If your API level is lower than API 21, please contact onesupport@medallia.com so we can understand how to best mitigate this.

Installation and Environment Setup

We provide the SDK as an AAR file. You can either integrate the SDK via Maven or import it manually as an AAR module under your project. When integrating the SDK ensure that you:

  1. Add the SDK dependencies under your application build.gradle file.
  2. Subclass the Application class.
  3. Update your apps Manifest file.

The aim of the automatic integration is to produce two build variants:

  1. Admin mode. Admin mode provides you with an interface that lets you add Activity Capture Points to interactions and elements, Attribute Capture Points to elements, and preview your configuration before publishing it to your live environment.

    Note: The Admin mode build should only be distributed internally to business users involved in MXO setup. This is your internal dev build.
    . For more information, see Configure the SDK in Admin mode for internal distribution.
  2. User mode. The User mode build should be made available through the Play Store, when you are satisfied that all insights are being tracked in Admin mode and internal QA requirements have been met. For more information, see For more information, see Configure the SDK in User mode for Play Store builds.

Step 1: Finding your Integration Parameters in MXO

You need to provide specific information about your MXO environment when integrating your mobile solution with the SDK. These integration parameters include:

  • Site Key (for your specific Space)
  • Touchpoint URI
  • API Key & Shared Secret (required for OAuth 1.0 authentication)
  • Username/User ID
  • Host name. Typically, this is https://na5.thunderhead.com or https://eu2.thunderhead.com.

For more information, see Find the Information required when Integrating MXO with your Mobile Solutions.

Step 2: Define the SDK Configuration Parameters using the Integration Parameters for your Space

Configure the SDK using the integration parameters specific to your MXO environment.

Example

// Initialization parameters example for your Android app const val SITE_KEY = "ONE-XXXXXXXX-6100" // OAuth 1 credentials and user id const val API_KEY = "2506c0b4-XXXX-XXXX-XXXX-2503e8e211c5" const val SHARED_SECRET = "7d546df6-XXXX-XXXX-XXXX-0630d6bff23e" const val USER_ID = "api@mytenancyname"; const val HOST = "https://xx.thunderhead.com" const val TOUCHPOINT = "android://myAndroidAppTouchpointUri" 

Step 3: Configure the SDK in Admin mode

Configure the SDK in Admin mode and use this to create your Admin mode Build for internal distribution.

 import com.thunderhead.android.api.oneConfigure import com.thunderhead.Onemodes; // The rest of the imports class YourApplication : Application() { override fun onCreate() { super.onCreate() oneConfigure { siteKey = SITE_KEY apiKey = API_KEY sharedSecret = SHARED_SECRET userId = USER_ID host = URI(HOST) touchpoint = URI(TOUCHPOINT) mode = Onemodes.ADMIN_MODE } } companion object { const val SITE_KEY = "ONE-XXXXXXXX-6100" const val API_KEY = "2506c0b4-XXXX-XXXX-XXXX-2503e8e211c5" const val SHARED_SECRET = "7d546df6-XXXX-XXXX-XXXX-0630d6bff23e" const val USER_ID = "api@mytenancyname" const val HOST = "https://xx.thunderhead.com" const val TOUCHPOINT = "android://myAndroidAppTouchpointUri" } } 

Step 4: Configure the SDK in User mode

Configure the SDK in User mode and use this to create your User mode Build for publication to the Google Play Store.

 import com.thunderhead.android.api.oneConfigure import com.thunderhead.Onemodes; // The rest of the imports class YourApplication : Application() { override fun onCreate() { super.onCreate() oneConfigure { siteKey = SITE_KEY apiKey = API_KEY sharedSecret = SHARED_SECRET userId = USER_ID host = URI(HOST) touchpoint = URI(TOUCHPOINT) mode = Onemodes.USER_MODE } } companion object { const val SITE_KEY = "ONE-XXXXXXXX-6100" const val API_KEY = "2506c0b4-XXXX-XXXX-XXXX-2503e8e211c5" const val SHARED_SECRET = "7d546df6-XXXX-XXXX-XXXX-0630d6bff23e" const val USER_ID = "api@mytenancyname" const val HOST = "https://xx.thunderhead.com" const val TOUCHPOINT = "android://myAndroidAppTouchpointUri" } }