InMobi Mediation API

This package provides the InMobi mediation adapter for the Google Mobile Ads (GMA) React Native SDK, supporting the React Native New Architecture (TurboModules).

Usage

To pass targeting parameters to InMobi, supply InMobiMediationExtras in your AdRequest:

import { AdRequest } from '@google/mobile-ads';
import {
  InMobiMediationExtras,
  InMobiAgeGroup,
  InMobiEducation,
  InMobiLogLevel,
} from 'gma-mediation-inmobi';

const inmobiExtras = new InMobiMediationExtras({
  ageGroup: InMobiAgeGroup.BETWEEN_25_AND_29,
  education: InMobiEducation.COLLEGE_OR_GRADUATE,
  logLevel: InMobiLogLevel.DEBUG,
  postalCode: '12345',
  city: 'NY',
  state: 'NY',
  country: 'US',
  interests: 'sports',
  keywords: 'football',
});

const request: AdRequest = {
  adUnitId: 'YOUR_AD_UNIT_ID',
  mediationExtras: [inmobiExtras],
};

Classes
InMobiMediationExtras
Mediation extras for the InMobi adapter.
Interfaces
InMobiMediationExtrasParams
Parameters for configuring InMobi mediation extras.
Type Aliases
InMobiAgeGroup
Type representing an InMobi target demographic age group.
InMobiEducation
Type representing an InMobi target demographic education level.
InMobiLogLevel
Type representing an InMobi SDK log level.
Variables
InMobiMediation
InMobi mediation namespace export.

Type Aliases


InMobiAgeGroup

InMobiAgeGroup: typeof InMobiAgeGroup[keyof typeof InMobiAgeGroup]
Type representing an InMobi target demographic age group.
Properties
ABOVE_65
User is above 65 years old.
BELOW_18
User is under 18 years old.
BETWEEN_18_AND_24
User is between 18 and 24 years old.
BETWEEN_25_AND_29
User is between 25 and 29 years old.
BETWEEN_30_AND_34
User is between 30 and 34 years old.
BETWEEN_35_AND_44
User is between 35 and 44 years old.
BETWEEN_45_AND_54
User is between 45 and 54 years old.
BETWEEN_55_AND_65
User is between 55 and 65 years old.

InMobiEducation

InMobiEducation: typeof InMobiEducation[keyof typeof InMobiEducation]
Type representing an InMobi target demographic education level.
Properties
COLLEGE_OR_GRADUATE
College or undergraduate graduate.
HIGH_SCHOOL_OR_LESS
High school education or less.
POST_GRADUATE_OR_ABOVE
Post-graduate or above.

InMobiLogLevel

InMobiLogLevel: typeof InMobiLogLevel[keyof typeof InMobiLogLevel]
Type representing an InMobi SDK log level.
Properties
DEBUG
Debug log level.
ERROR
Error log level.
NONE
Logging disabled.

Variables


Const InMobiMediation

InMobiMediation: {} = {}
InMobi mediation namespace export.

InMobiMediationExtras

Mediation extras for the InMobi adapter.
Constructors
constructor
Properties
androidAdapterClassName
The Android mediation extra adapter class name.
extras
The extra parameters passed to the mediation adapter.
iosAdapterClassName
The iOS mediation extra adapter class name.

Constructors


constructor

new InMobiMediationExtras(params?): InMobiMediationExtras
Parameters
Optional params: InMobiMediationExtrasParams
Returns
InMobiMediationExtras

Properties


Readonly androidAdapterClassName

androidAdapterClassName: "com.google.mobileads.mediation.inmobi.InMobiMediationExtras" = "com.google.mobileads.mediation.inmobi.InMobiMediationExtras"
The Android mediation extra adapter class name.

Readonly extras

extras: Readonly<Record<string, unknown>>
The extra parameters passed to the mediation adapter.

Readonly iosAdapterClassName

iosAdapterClassName: "GADRInMobiMediationExtras" = "GADRInMobiMediationExtras"
The iOS mediation extra adapter class name.

InMobiMediationExtrasParams

Parameters for configuring InMobi mediation extras.
Properties
age?
The exact age of the user.
ageGroup?
The age group of the user.
areaCode?
The area code of the user's location.
city?
The city of the user's location.
country?
The country of the user's location.
education?
The education level of the user.
interests?
Comma-separated list of user interests.
keywords?
Comma-separated list of targeting keywords.
language?
The preferred language of the user, such as an ISO language code.
logLevel?
The log level for the InMobi SDK.
postalCode?
The postal code of the user's location.
state?
The state of the user's location.
yearOfBirth?
The year of birth of the user.

Properties


Optional Readonly age

age?: number
The exact age of the user.

Optional Readonly ageGroup

ageGroup?: InMobiAgeGroup
The age group of the user.

Optional Readonly areaCode

areaCode?: string
The area code of the user's location.

Optional Readonly city

city?: string
The city of the user's location.

Optional Readonly country

country?: string
The country of the user's location.

Optional Readonly education

education?: InMobiEducation
The education level of the user.

Optional Readonly interests

interests?: string
Comma-separated list of user interests.

Optional Readonly keywords

keywords?: string
Comma-separated list of targeting keywords.

Optional Readonly language

language?: string
The preferred language of the user, such as an ISO language code.

Optional Readonly logLevel

logLevel?: InMobiLogLevel
The log level for the InMobi SDK.

Optional Readonly postalCode

postalCode?: string
The postal code of the user's location.

Optional Readonly state

state?: string
The state of the user's location.

Optional Readonly yearOfBirth

yearOfBirth?: number
The year of birth of the user.