Android Integration


1. Import the InMobi SDK header and initialize it.

InMobiSdk.init(this, "Insert InMobi Account ID here", consentObject, new SdkInitializationListener() {
    public void onInitializationComplete(@Nullable Error error) {
        if (null != error) {
            Log.e(TAG, "InMobi Init failed -" + error.getMessage());
        } else {
            Log.d(TAG, "InMobi Init Successful");

2. Create a user data model as follows:

InMobiUserDataTypes phoneNumber = new
InMobiUserDataTypes emailId = new I
HashMap<String, String> extras = new HashMap<>();
extras.put("appSpecificUniqueId", "XXXXXXXX");
InMobiUserDataModel userDataModel = new

3. Pass this data model to fetch the API.


4. Use this API to fetch the UnifIDs.



Implement the following delegates to receive the callbacks.

class MyActivity implements InMobiUnifiedIDInterface {
        public void onFetchCompleted(JSONObject response, Error error) {


Call this reset API to clear all the user-related data and Ids stored in the SDK.


Publisher provided Unified Ids (Optional)

If you have an ID from a Vendor, you can use it in the following SDK. If there is an overlap, the system prioritizes the InMobi procured Unified IDs.

InMobiSdk.setPublisherProvidedUnifiedID(JSONObject unifiedIds);

JSONObject structure:

    "id5" : "json(blob)", 
    "live Ramp": "json(blob)" 

Recommended Usage

InMobi’s Unifi APIs expects hashed e-mail or telephone numbers to generate the identity envelope. To enhance matching, ensure to

  • Remove whitespace, blank spaces, tabs, and other characters from the plain language e-mail id.
  • Convert all the uppercase characters to lowercase.
  • Validate the email id against a regular expression.



For email ids with

  • Remove ‘.’ (ASCII code 46) from the username of the e-mail address. normalizes to
  • Remove ‘+’ (ASCII code 43) and all subsequent characters from the username of the e-mail address. normalizes to

On This Page

Last Updated on: 01 Feb, 2022