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 | |
|---|---|
In
|
Mediation extras for the InMobi adapter. |
| Interfaces | |
|---|---|
In
|
Parameters for configuring InMobi mediation extras.
|
| Type Aliases | |
|---|---|
In
|
Type representing an InMobi target demographic age group.
|
In
|
Type representing an InMobi target demographic education level.
|
In
|
Type representing an InMobi SDK log level. |
| Variables | |
|---|---|
In
|
InMobi mediation namespace export. |
Type Aliases
InMobiAgeGroup
InMobiAgeGroup: typeof InMobiAgeGroup[keyof typeof InMobiAgeGroup]
InMobiEducation
InMobiEducation: typeof InMobiEducation[keyof typeof InMobiEducation]
| Properties | |
|---|---|
COLLEGE_
|
College or undergraduate graduate. |
HIGH_
|
High school education or less. |
POST_
|
Post-graduate or above. |
InMobiLogLevel
InMobiLogLevel: typeof InMobiLogLevel[keyof typeof InMobiLogLevel]
| Properties | |
|---|---|
DEBUG
|
Debug log level. |
ERROR
|
Error log level. |
NONE
|
Logging disabled. |
Variables
Const InMobiMediation
InMobiMediation: {} = {}
InMobiMediationExtras
Mediation extras for the InMobi adapter.
| Constructors | |
|---|---|
constructor
|
|
| Properties | |
|---|---|
android
|
The Android mediation extra adapter class name.
|
extras
|
The extra parameters passed to the mediation adapter.
|
ios
|
The iOS mediation extra adapter class name. |
Constructors
constructor
new InMobiMediationExtras(params?): InMobiMediationExtras
| Parameters | |
|---|---|
|
|
| Returns | |
|---|---|
InMobiMediationExtras
|
|
Properties
Readonly androidAdapterClassName
androidAdapterClassName:
"com.google.mobileads.mediation.inmobi.InMobiMediationExtras"
=
"com.google.mobileads.mediation.inmobi.InMobiMediationExtras"
Readonly extras
extras: Readonly<Record<string, unknown>>
Readonly iosAdapterClassName
iosAdapterClassName:
"GADRInMobiMediationExtras" = "GADRInMobiMediationExtras"
InMobiMediationExtrasParams
Parameters for configuring InMobi mediation extras.
| Properties | |
|---|---|
age
|
The exact age of the user. |
age
|
The age group of the user. |
area
|
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.
|
log
|
The log level for the InMobi SDK. |
postal
|
The postal code of the user's location. |
state
|
The state of the user's location. |
year
|
The year of birth of the user. |
Properties
Optional Readonly age
age?: number
Optional Readonly ageGroup
ageGroup?:
InMobiAgeGroup
Optional Readonly areaCode
areaCode?:
string
Optional Readonly city
city?: string
Optional Readonly country
country?: string
Optional Readonly education
education?:
InMobiEducation
Optional Readonly interests
interests?:
string
Optional Readonly keywords
keywords?:
string
Optional Readonly language
language?:
string
Optional Readonly logLevel
logLevel?:
InMobiLogLevel
Optional Readonly
postalCode
postalCode?:
string
Optional Readonly state
state?: string
Optional Readonly
yearOfBirth
yearOfBirth?:
number