Skip to main content

Repository

Repositories can be used to preload ads in the app and show them to the user when they navigate to some part of your app.

registerRepository​

Register a repository to preload ads

Properties​

NameTypeRequired
namestringno
adUnitIdAd Content Ratingsyes
numOfAdsnumberno
requestNonPersonalizedAdsOnlybooleanno
expirationPeriodnumberno
mediationEnabledbooleanno
videoOptionsVideoOptionsno
mediationOptionsMediationOptionsno
targetingOptionsTargetingOptionsno
adChoicesPlacement"topLeft","topRight","bottomLeft","bottomRight"no
mediaAspectRatio"any","landscape","portrait","square","unknown"no

unRegisterRepository​

Unregister a repository. All preloaded ads in this repository will be destroyed.

resetCache​

Reset all ad repositories.

hasAd​

Check if there is ad in a repository.