MicroStrategy ONE

Configure Your Android App

  1. To add the SSO framework to your Android app, copy ssolib.jar to your Android project libs folder. You will be able to use the library's classes by importing them using the following Java import statements:

    import com.usherpro.ssolib.SSOClient;
    import com.usherpro.ssolib.SSOPermission;
    import com.usherpro.ssolib.SSORequest;
    import com.usherpro.ssolib.SSORequestHandler;
    import com.usherpro.ssolib.exceptions.SSOException;
  2. To configure the AndroidManifest.xml file, make sure one of your activities handles a callback scheme. The scheme must be formatted as uniusherappID, where appID is the Application ID of your mobile app configuration provided by MicroStrategy Identity.
    To determine your Application ID, in MicroStrategy Identity Manager, click Logical Gateways, then click Edit next to the name of your app name.

    <activity
    android:name="packageName.className"android:launchMode="singleTask"android:label="@string/app_name" ><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter> 
    <intent-filter><data android:scheme="callbackScheme" /><action android:name="android.intent.action.VIEW" /><category android:name="android.intent.category.DEFAULT" /><category android:name="android.intent.category.BROWSABLE" /></intent-filter></activity>

    where:

    • packageName = the Android package name. For example, com.mstr.ssocaller.
    • className = the class name. For example, SSOCallerActivity.
    • callbackScheme = the callback scheme.
  3. By default, the Identity single sign-on (SSO) SDK reads the following fields from your app's AndroidManifest.xml file. Alternatively, you can set them programmatically.

    • ApplicationID: The Application ID for the mobile app that you registered with MicroStrategy Identity. This value is provided by MicroStrategy Identity Manager. (To determine your Application ID, in MicroStrategy Identity Manager, click Logical Gateways, then click Edit next to the name of your app.)
      • Programmatically:
        SSOClient.getInstance().setApplicationID(ApplicationID);
        where:
        • ApplicationID = the Application ID (string data type). For example, 884.
    • OrganizationID: The Organization ID of your network. This value is provided by MicroStrategy Identity Manager. (To determine your Organization ID, in MicroStrategy Identity Manager, click Logical Gateways, then click Edit next to the name of your app.)
      • Programmatically:
        SSOClient.getInstance().setOrganizationID(OrganizationID);
        where:
        • OrganizationID is the Organization ID of your network (number data type). For example, 840965.
    • PackageName: The Android package name of your app.
      • Programmatically:
        SSOClient.getInstance().setPackageName("packageName");
        where:
        • packageName = the Android package name of your app (string data type).
    • ServerUrl: For on-premises implementations, the connection information for MicroStrategy Identity Server.
      • Programmatically:
        SSOClient.getInstance().setServerURL("https://Server:Port");
        where:
        • Server = the URL for MicroStrategy Identity Server (string data type).
        • Port = the port for MicroStrategy Identity Server (string data type).
  4. The Android package name registered in MicroStrategy Identity Manager must match the package name of your app defined in the AndroidManifest.xml file. To verify this:
    1. Open the AndroidManifest.xml file in a text editor. Note the package name.
    2. In MicroStrategy Identity Manager, click Logical Gateways. Next to the app whose package name you want to verify, click Edit. The package name will appear in the Android package name field.
    3. Verify that the two Android package names match.

Next, use the SSO library to implement MicroStrategy Identity authentication in your Android app.