-
Notifications
You must be signed in to change notification settings - Fork 127
Events
title: Events description: Events url: /Events contributors:
- appfeel
- bitgenoma
- marcpascualsanchez
- miqmago
AdMobAds Cordova library will use the same events for Android as for iOS (the iOS ones are mapped to the Android ones). See Google Docs for more info.
To listen to any of those events you can use:
document.addEventListener(admob.events.onAdLoaded, function (e) { });
Called when an ad is received.
- e: JSON object.
Example:{ adType : "banner" }
- adType can be
admob.AD_TYPE.BANNER
oradmob.AD_TYPE.INTERSTITIAL
- adType can be
Called when an ad request failed.
- e: JSON object.
Example:{ adType : "[string]", error : [integer], reason : "[string]" }
- adType can be admob.AD_TYPE.BANNER or admob.AD_TYPE.INTERSTITIAL
- error is the error code and is usually one of the following:
- AdRequest.ERROR_CODE_INTERNAL_ERROR
- AdRequest.ERROR_CODE_INVALID_REQUEST
- AdRequest.ERROR_CODE_NETWORK_ERROR
- AdRequest.ERROR_CODE_NO_FILL
- reason is an english string with the reason of the error (for logging purposes).
Called when an ad opens an overlay that covers the screen.
Please note that onPause
event is raised when an interstitial is shown.
- e: JSON object.
Example:{ adType : "banner" }
- adType can be
admob.AD_TYPE.BANNER
oradmob.AD_TYPE.INTERSTITIAL
- adType can be
Called when the user is about to return to the application after clicking on an ad.
Please note that onResume
event is raised when an interstitial is closed.
- e: JSON object.
Example:{ adType : "banner" }
- adType can be
admob.AD_TYPE.BANNER
oradmob.AD_TYPE.INTERSTITIAL
- adType can be
Called when an ad leaves the application (e.g., to go to the browser).
- e: JSON object.
Example:{ adType : "banner" }
- adType can be
admob.AD_TYPE.BANNER
oradmob.AD_TYPE.INTERSTITIAL
- adType can be
Called when the user clicks the buy button of an in-app purchase ad. You shoud complete the transaction by calling admob.recordResolution(...)
or admob.recordPlayBillingResolution(...)
.
- e: JSON object.
Example:{ adType : "banner" }
- adType can be
admob.AD_TYPE.BANNER
oradmob.AD_TYPE.INTERSTITIAL
- adType can be