public final class

InMobiSdk

extends Object
java.lang.Object
   ↳ com.inmobi.sdk.InMobiSdk

Class Overview

Constants and settings that have effect across the InMobi SDK.

As part of the General Data Protection Regulation ("GDPR") publishers who collect data on their apps, are required to have a legal basis for collecting and processing the personal data of users in the European Economic Area ("EEA"). Please ensure that you obtain appropriate consent from the user before making ad requests to InMobi for Europe and indicate the same by following our recommended SDK implementation. Please do not pass any demographics information of a user; if you do not have user consent from such user in Europe.

Summary

Nested Classes
enum InMobiSdk.AgeGroup  
enum InMobiSdk.Education  
enum InMobiSdk.Gender  
enum InMobiSdk.LogLevel  
Constants
String IM_GDPR_CONSENT_AVAILABLE Populate this key to consentObject with boolean value.
Public Constructors
InMobiSdk()
Public Methods
static String getVersion()
Use this to get the version of the SDK.
static void init(Context context, String accountId, JSONObject consentObject)
Initialize the sdk.
static void init(Context context, String accountId)
Initialize the sdk.
static void setAge(int age)
Set the user's age for targeting purposes.
static void setAgeGroup(InMobiSdk.AgeGroup group)
Set the user's age group for targeting purposes.
static void setApplicationMuted(boolean muted)
static void setAreaCode(String areaCode)
Set the area code for targeting purposes.
static void setEducation(InMobiSdk.Education education)
Set the educational qualifications of the user for targeting purposes.
static void setGender(InMobiSdk.Gender gender)
Set the user's gender for targeting purposes.
static void setInterests(String interests)
Set the user's interest areas for targeting purposes.
static void setLanguage(String language)
Set the language for targeting purposes.
static void setLocation(Location location)
Set the user's location for targeting purposes.
static void setLocationWithCityStateCountry(String city, String state, String country)
Set specific location parameters for targeting purposes.
static void setLogLevel(InMobiSdk.LogLevel logLevel)
Control the verbosity of the logs printed by the Ads SDK.
static void setPostalCode(String postalCode)
Set the postal code for targeting purposes.
static void setYearOfBirth(int yearOfBirth)
Set the user's year of birth for targeting purposes.
static void updateGDPRConsent(JSONObject consentObject)
Update user's GDPR consent.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String IM_GDPR_CONSENT_AVAILABLE

Populate this key to consentObject with boolean value.

Constant Value: "gdpr_consent_available"

Public Constructors

public InMobiSdk ()

Public Methods

public static String getVersion ()

Use this to get the version of the SDK.

Returns
  • The version of the SDK.

public static void init (Context context, String accountId, JSONObject consentObject)

Initialize the sdk. This must be called before any other API for the SDK is used.

Parameters
consentObject InMobi relies on the publishers to obtain explicit consent from users for continuing business activities in EU as per GDPR. Consent object allows publishers to indicate consent status as obtained from the users for InMobi services to function appropriately.

public static void init (Context context, String accountId)

Initialize the sdk. This must be called before any other API for the SDK is used.

public static void setAge (int age)

Set the user's age for targeting purposes.

public static void setAgeGroup (InMobiSdk.AgeGroup group)

Set the user's age group for targeting purposes.

public static void setApplicationMuted (boolean muted)

public static void setAreaCode (String areaCode)

Set the area code for targeting purposes.

public static void setEducation (InMobiSdk.Education education)

Set the educational qualifications of the user for targeting purposes.

public static void setGender (InMobiSdk.Gender gender)

Set the user's gender for targeting purposes.

public static void setInterests (String interests)

Set the user's interest areas for targeting purposes.

public static void setLanguage (String language)

Set the language for targeting purposes.

public static void setLocation (Location location)

Set the user's location for targeting purposes.

public static void setLocationWithCityStateCountry (String city, String state, String country)

Set specific location parameters for targeting purposes.

public static void setLogLevel (InMobiSdk.LogLevel logLevel)

Control the verbosity of the logs printed by the Ads SDK.

Parameters
logLevel choose from DEBUG, or NONE

public static void setPostalCode (String postalCode)

Set the postal code for targeting purposes.

public static void setYearOfBirth (int yearOfBirth)

Set the user's year of birth for targeting purposes.

public static void updateGDPRConsent (JSONObject consentObject)

Update user's GDPR consent.