Integrate the Flutter SDK for MXO in your App

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

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

Flutter SDK for MXO

Minimum Version Requirements

  • Android: API 21 (Android 5) or higher
  • iOS: iOS 9.0 or higher
  • Flutter: 1.22.0 or higher

Installation and Environment Setup

You can integrate the SDK by adding the one_sdk_flutter dependency to your project's pubspec.yaml file.

The aim of the integration is to produce a User mode build variant.

Unsupported Features

Due to the nature of hybrid app solutions, the following Mobile SDK features are not supported:

  • Automatic integration
  • Admin Mode

This is because, typically, hybrid app solutions use non-native UI elements that the Hybrid SDKs are unable to recognize.

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 Initialization Parameters using the Integration Parameters for your Space

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

Example

// Initialization parameters example for your Flutter app final String SITE_KEY = "ONE-XXXXXXXXXX-1022"; final String TOUCHPOINT = "myAppsNameURI"; final String API_KEY = "f713d44a-8af0-4e79-ba7e-xxxxxxxxx"; final String SHARED_SECRET = "bb8bacb2-ffc2-4c52-aaf4-xxx"; final String USER_ID = @"api@mytenancyname"; final String HOST = @"xxx.thunderhead.com"; 

Step 3: Configure the SDK

In your dart file, configure the SDK as follows:

import 'package:one_sdk_flutter/one_sdk_flutter.dart'; One.initializeOne(SITE_KEY, TOUCHPOINT, API_KEY, SHARED_SECRET, USER_ID, HOST, false)