@capacitor-community/admob 8.1.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -324
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/getcapacitor/community/admob/AdMob.java +13 -3
- package/android/src/main/java/com/getcapacitor/community/admob/banner/BannerExecutor.java +261 -141
- package/android/src/main/java/com/getcapacitor/community/admob/helpers/FullscreenPluginCallback.kt +5 -1
- package/android/src/main/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutor.java +27 -31
- package/android/src/main/java/com/getcapacitor/community/admob/interstitial/InterstitialAdCallbackAndListeners.kt +1 -1
- package/android/src/main/java/com/getcapacitor/community/admob/models/LoadPluginEventNames.kt +2 -1
- package/android/src/main/java/com/getcapacitor/community/admob/rewarded/AdRewardExecutor.java +29 -33
- package/android/src/main/java/com/getcapacitor/community/admob/rewarded/RewardAdPluginEvents.kt +2 -1
- package/android/src/main/java/com/getcapacitor/community/admob/rewarded/RewardedAdCallbackAndListeners.kt +1 -1
- package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/AdRewardInterstitialExecutor.java +29 -37
- package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/RewardedInterstitialAdCallbackAndListeners.kt +1 -1
- package/dist/docs.json +33 -3
- package/dist/esm/interstitial/interstitial-definitions.interface.d.ts +3 -0
- package/dist/esm/reward/reward-ad-plugin-events.enum.d.ts +4 -0
- package/dist/esm/reward/reward-ad-plugin-events.enum.js +4 -0
- package/dist/esm/reward/reward-ad-plugin-events.enum.js.map +1 -1
- package/dist/esm/reward/reward-definitions.interface.d.ts +8 -0
- package/dist/esm/reward-interstitial/reward-interstitial-definitions.interface.d.ts +3 -0
- package/dist/plugin.cjs.js +4 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +4 -0
- package/dist/plugin.js.map +1 -1
- package/docs/app-open.md +53 -0
- package/docs/banner.md +100 -0
- package/docs/configuration.md +30 -0
- package/docs/consent.md +80 -0
- package/docs/events.md +75 -0
- package/docs/interstitial.md +47 -0
- package/docs/migration.md +126 -0
- package/docs/rewarded.md +135 -0
- package/docs/testing.md +67 -0
- package/ios/Sources/AdMobPlugin/AdMobPlugin.swift +4 -1
- package/ios/Sources/AdMobPlugin/AppOpen/AppOpenAdManager.swift +1 -1
- package/ios/Sources/AdMobPlugin/Banner/BannerExecutor.swift +1 -1
- package/ios/Sources/AdMobPlugin/Interstitial/AdInterstitialExecutor.swift +3 -3
- package/ios/Sources/AdMobPlugin/Rewarded/AdRewardExecutor.swift +7 -3
- package/ios/Sources/AdMobPlugin/Rewarded/RewardAdPluginEvents.swift +1 -0
- package/ios/Sources/AdMobPlugin/RewardedInterstitial/AdRewardInterstitialExecutor.swift +3 -3
- package/package.json +3 -1
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/banner/banner-ad-plugin-events.enum.js","esm/banner/banner-ad-position.enum.js","esm/banner/banner-ad-size.enum.js","esm/interstitial/interstitial-ad-plugin-events.enum.js","esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.js","esm/reward/reward-ad-plugin-events.enum.js","esm/consent/consent-status.enum.js","esm/consent/consent-debug-geography.enum.js","esm/shared/ad-mob-revenue-data.interface.js","esm/app-open/app-open-ad-plugin-events.enum.js","esm/index.js","esm/consent/privacy-options-requirement-status.enum.js","esm/web.js"],"sourcesContent":["export var MaxAdContentRating;\n(function (MaxAdContentRating) {\n /**\n * Content suitable for general audiences, including families.\n */\n MaxAdContentRating[\"General\"] = \"General\";\n /**\n * Content suitable for most audiences with parental guidance.\n */\n MaxAdContentRating[\"ParentalGuidance\"] = \"ParentalGuidance\";\n /**\n * Content suitable for teen and older audiences.\n */\n MaxAdContentRating[\"Teen\"] = \"Teen\";\n /**\n * Content suitable only for mature audiences.\n */\n MaxAdContentRating[\"MatureAudience\"] = \"MatureAudience\";\n})(MaxAdContentRating || (MaxAdContentRating = {}));\n//# sourceMappingURL=definitions.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var BannerAdPluginEvents;\n(function (BannerAdPluginEvents) {\n /**\n * Emits when the displayed banner size changes.\n */\n BannerAdPluginEvents[\"SizeChanged\"] = \"bannerAdSizeChanged\";\n /**\n * Emits when a banner ad has loaded.\n */\n BannerAdPluginEvents[\"Loaded\"] = \"bannerAdLoaded\";\n /**\n * Emits when a banner ad fails to load.\n */\n BannerAdPluginEvents[\"FailedToLoad\"] = \"bannerAdFailedToLoad\";\n /**\n * Emits when a banner opens an overlay after the user taps it.\n */\n BannerAdPluginEvents[\"Opened\"] = \"bannerAdOpened\";\n /**\n * Emits when the banner overlay is closed.\n */\n BannerAdPluginEvents[\"Closed\"] = \"bannerAdClosed\";\n /**\n * Emits when an impression is recorded for the banner ad.\n */\n BannerAdPluginEvents[\"AdImpression\"] = \"bannerAdImpression\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n BannerAdPluginEvents[\"AdPaid\"] = \"bannerAdPaid\";\n})(BannerAdPluginEvents || (BannerAdPluginEvents = {}));\n//# sourceMappingURL=banner-ad-plugin-events.enum.js.map","/**\n * @see https://developer.android.com/reference/android/widget/LinearLayout#attr_android:gravity\n */\nexport var BannerAdPosition;\n(function (BannerAdPosition) {\n /**\n * Positions the banner at the top center of the screen.\n */\n BannerAdPosition[\"TOP_CENTER\"] = \"TOP_CENTER\";\n /**\n * Positions the banner at the center of the screen.\n */\n BannerAdPosition[\"CENTER\"] = \"CENTER\";\n /**\n * Positions the banner at the bottom center of the screen.\n */\n BannerAdPosition[\"BOTTOM_CENTER\"] = \"BOTTOM_CENTER\";\n})(BannerAdPosition || (BannerAdPosition = {}));\n//# sourceMappingURL=banner-ad-position.enum.js.map","/**\n * For more information:\n * https://developers.google.com/admob/ios/banner#banner_sizes\n * https://developers.google.com/android/reference/com/google/android/gms/ads/AdSize\n *\n * */\nexport var BannerAdSize;\n(function (BannerAdSize) {\n /**\n * Mobile Marketing Association (MMA)\n * banner ad size (320x50 density-independent pixels).\n */\n BannerAdSize[\"BANNER\"] = \"BANNER\";\n /**\n * Interactive Advertising Bureau (IAB)\n * full banner ad size (468x60 density-independent pixels).\n */\n BannerAdSize[\"FULL_BANNER\"] = \"FULL_BANNER\";\n /**\n * Large banner ad size (320x100 density-independent pixels).\n */\n BannerAdSize[\"LARGE_BANNER\"] = \"LARGE_BANNER\";\n /**\n * Interactive Advertising Bureau (IAB)\n * medium rectangle ad size (300x250 density-independent pixels).\n */\n BannerAdSize[\"MEDIUM_RECTANGLE\"] = \"MEDIUM_RECTANGLE\";\n /**\n * Interactive Advertising Bureau (IAB)\n * leaderboard ad size (728x90 density-independent pixels).\n */\n BannerAdSize[\"LEADERBOARD\"] = \"LEADERBOARD\";\n /**\n * A dynamically sized banner that is full-width and auto-height.\n */\n BannerAdSize[\"ADAPTIVE_BANNER\"] = \"ADAPTIVE_BANNER\";\n /**\n * A legacy smart banner sized to the screen width.\n * Retained for compatibility; use `ADAPTIVE_BANNER` for new integrations.\n *\n * @deprecated Use `ADAPTIVE_BANNER` instead.\n */\n BannerAdSize[\"SMART_BANNER\"] = \"SMART_BANNER\";\n})(BannerAdSize || (BannerAdSize = {}));\n//# sourceMappingURL=banner-ad-size.enum.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var InterstitialAdPluginEvents;\n(function (InterstitialAdPluginEvents) {\n /**\n * Emits when an interstitial ad has loaded and is ready to show.\n */\n InterstitialAdPluginEvents[\"Loaded\"] = \"interstitialAdLoaded\";\n /**\n * Emits when an interstitial ad fails to load.\n */\n InterstitialAdPluginEvents[\"FailedToLoad\"] = \"interstitialAdFailedToLoad\";\n /**\n * Emits when an interstitial ad is shown.\n */\n InterstitialAdPluginEvents[\"Showed\"] = \"interstitialAdShowed\";\n /**\n * Emits when a loaded interstitial ad fails to show.\n */\n InterstitialAdPluginEvents[\"FailedToShow\"] = \"interstitialAdFailedToShow\";\n /**\n * Emits when an interstitial ad is dismissed.\n */\n InterstitialAdPluginEvents[\"Dismissed\"] = \"interstitialAdDismissed\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n InterstitialAdPluginEvents[\"AdImpression\"] = \"interstitialAdImpression\";\n})(InterstitialAdPluginEvents || (InterstitialAdPluginEvents = {}));\n//# sourceMappingURL=interstitial-ad-plugin-events.enum.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var RewardInterstitialAdPluginEvents;\n(function (RewardInterstitialAdPluginEvents) {\n /**\n * Emits when a rewarded interstitial ad has loaded and is ready to show.\n */\n RewardInterstitialAdPluginEvents[\"Loaded\"] = \"onRewardedInterstitialAdLoaded\";\n /**\n * Emits when a rewarded interstitial ad fails to load.\n */\n RewardInterstitialAdPluginEvents[\"FailedToLoad\"] = \"onRewardedInterstitialAdFailedToLoad\";\n /**\n * Emits when a rewarded interstitial ad is shown.\n */\n RewardInterstitialAdPluginEvents[\"Showed\"] = \"onRewardedInterstitialAdShowed\";\n /**\n * Emits when a loaded rewarded interstitial ad fails to show.\n */\n RewardInterstitialAdPluginEvents[\"FailedToShow\"] = \"onRewardedInterstitialAdFailedToShow\";\n /**\n * Emits when a rewarded interstitial ad is dismissed.\n *\n * This event does not indicate whether the user earned a reward. Listen for\n * `Rewarded` separately before granting the reward.\n */\n RewardInterstitialAdPluginEvents[\"Dismissed\"] = \"onRewardedInterstitialAdDismissed\";\n /**\n * Emits when the user earns the advertised reward.\n */\n RewardInterstitialAdPluginEvents[\"Rewarded\"] = \"onRewardedInterstitialAdReward\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n RewardInterstitialAdPluginEvents[\"AdImpression\"] = \"onRewardedInterstitialAdImpression\";\n})(RewardInterstitialAdPluginEvents || (RewardInterstitialAdPluginEvents = {}));\n//# sourceMappingURL=reward-interstitial-ad-plugin-events.enum.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var RewardAdPluginEvents;\n(function (RewardAdPluginEvents) {\n /**\n * Emits when a rewarded ad has loaded and is ready to show.\n */\n RewardAdPluginEvents[\"Loaded\"] = \"onRewardedVideoAdLoaded\";\n /**\n * Emits when a rewarded ad fails to load.\n */\n RewardAdPluginEvents[\"FailedToLoad\"] = \"onRewardedVideoAdFailedToLoad\";\n /**\n * Emits when a rewarded ad is shown.\n */\n RewardAdPluginEvents[\"Showed\"] = \"onRewardedVideoAdShowed\";\n /**\n * Emits when a loaded rewarded ad fails to show.\n */\n RewardAdPluginEvents[\"FailedToShow\"] = \"onRewardedVideoAdFailedToShow\";\n /**\n * Emits when a rewarded ad is dismissed.\n *\n * This event does not indicate whether the user earned a reward. Listen for\n * `Rewarded` separately before granting the reward.\n */\n RewardAdPluginEvents[\"Dismissed\"] = \"onRewardedVideoAdDismissed\";\n /**\n * Emits when the user earns the advertised reward.\n */\n RewardAdPluginEvents[\"Rewarded\"] = \"onRewardedVideoAdReward\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n RewardAdPluginEvents[\"AdImpression\"] = \"onRewardedVideoAdImpression\";\n})(RewardAdPluginEvents || (RewardAdPluginEvents = {}));\n//# sourceMappingURL=reward-ad-plugin-events.enum.js.map","/**\n * For more information:\n * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#consentstatus\n *\n * */\nexport var AdmobConsentStatus;\n(function (AdmobConsentStatus) {\n /**\n * User consent not required.\n */\n AdmobConsentStatus[\"NOT_REQUIRED\"] = \"NOT_REQUIRED\";\n /**\n * User consent already obtained.\n */\n AdmobConsentStatus[\"OBTAINED\"] = \"OBTAINED\";\n /**\n * User consent required but not yet obtained.\n */\n AdmobConsentStatus[\"REQUIRED\"] = \"REQUIRED\";\n /**\n * Unknown consent status, AdsConsent.requestInfoUpdate needs to be called to update it.\n */\n AdmobConsentStatus[\"UNKNOWN\"] = \"UNKNOWN\";\n})(AdmobConsentStatus || (AdmobConsentStatus = {}));\n//# sourceMappingURL=consent-status.enum.js.map","/**\n * For more information:\n * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#debuggeography\n *\n * */\nexport var AdmobConsentDebugGeography;\n(function (AdmobConsentDebugGeography) {\n /**\n * Debug geography disabled.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"DISABLED\"] = 0] = \"DISABLED\";\n /**\n * Geography appears as in EEA for debug devices.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"EEA\"] = 1] = \"EEA\";\n /**\n * Geography appears as not in EEA for debug devices.\n * @deprecated\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"NOT_EEA\"] = 2] = \"NOT_EEA\";\n /**\n * Geography appears as in regulated US state for debug devices.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"US\"] = 3] = \"US\";\n /**\n * Geography appears as OTHER state for debug devices.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"OTHER\"] = 4] = \"OTHER\";\n})(AdmobConsentDebugGeography || (AdmobConsentDebugGeography = {}));\n//# sourceMappingURL=consent-debug-geography.enum.js.map","/**\n * The precision of an impression-level ad value.\n */\nexport var AdValuePrecision;\n(function (AdValuePrecision) {\n /**\n * The ad value precision is unknown.\n */\n AdValuePrecision[AdValuePrecision[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * The ad value is estimated from aggregated data.\n */\n AdValuePrecision[AdValuePrecision[\"Estimated\"] = 1] = \"Estimated\";\n /**\n * The ad value was provided by the publisher.\n */\n AdValuePrecision[AdValuePrecision[\"PublisherProvided\"] = 2] = \"PublisherProvided\";\n /**\n * The ad value is the precise value paid for this ad.\n */\n AdValuePrecision[AdValuePrecision[\"Precise\"] = 3] = \"Precise\";\n})(AdValuePrecision || (AdValuePrecision = {}));\n//# sourceMappingURL=ad-mob-revenue-data.interface.js.map","export var AppOpenAdPluginEvents;\n(function (AppOpenAdPluginEvents) {\n /**\n * Emits when an App Open ad has loaded.\n */\n AppOpenAdPluginEvents[\"Loaded\"] = \"appOpenAdLoaded\";\n /**\n * Emits when an App Open ad fails to load.\n */\n AppOpenAdPluginEvents[\"FailedToLoad\"] = \"appOpenAdFailedToLoad\";\n /**\n * Emits when an App Open ad is shown.\n */\n AppOpenAdPluginEvents[\"Opened\"] = \"appOpenAdOpened\";\n /**\n * Emits when an App Open ad is dismissed.\n */\n AppOpenAdPluginEvents[\"Closed\"] = \"appOpenAdClosed\";\n /**\n * Emits when a loaded App Open ad fails to show.\n */\n AppOpenAdPluginEvents[\"FailedToShow\"] = \"appOpenAdFailedToShow\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n AppOpenAdPluginEvents[\"AdImpression\"] = \"appOpenAdImpression\";\n})(AppOpenAdPluginEvents || (AppOpenAdPluginEvents = {}));\n//# sourceMappingURL=app-open-ad-plugin-events.enum.js.map","import { registerPlugin } from '@capacitor/core';\nconst AdMob = registerPlugin('AdMob', {\n web: () => import('./web').then((m) => new m.AdMobWeb()),\n});\nexport * from './definitions';\nexport * from './banner/index';\nexport * from './interstitial/index';\nexport * from './reward-interstitial/index';\nexport * from './reward/index';\nexport * from './consent/index';\nexport * from './shared/index';\nexport * from './app-open/index';\nexport { AdMob };\n//# sourceMappingURL=index.js.map","/**\n * For more information:\n * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#privacyoptionsrequirementstatus\n *\n * */\nexport var PrivacyOptionsRequirementStatus;\n(function (PrivacyOptionsRequirementStatus) {\n /**\n * Privacy options entry point is not required.\n */\n PrivacyOptionsRequirementStatus[\"NOT_REQUIRED\"] = \"NOT_REQUIRED\";\n /**\n * Privacy options entry point is required.\n */\n PrivacyOptionsRequirementStatus[\"REQUIRED\"] = \"REQUIRED\";\n /**\n * Privacy options requirement status is unknown.\n */\n PrivacyOptionsRequirementStatus[\"UNKNOWN\"] = \"UNKNOWN\";\n})(PrivacyOptionsRequirementStatus || (PrivacyOptionsRequirementStatus = {}));\n//# sourceMappingURL=privacy-options-requirement-status.enum.js.map","import { WebPlugin } from '@capacitor/core';\nimport { AdmobConsentStatus } from './consent/consent-status.enum';\nimport { PrivacyOptionsRequirementStatus } from './consent/privacy-options-requirement-status.enum';\nexport class AdMobWeb extends WebPlugin {\n async initialize() {\n console.log('initialize');\n }\n async requestTrackingAuthorization() {\n console.log('requestTrackingAuthorization');\n }\n async trackingAuthorizationStatus() {\n return {\n status: 'authorized',\n };\n }\n async requestConsentInfo(options) {\n console.log('requestConsentInfo', options);\n return {\n status: AdmobConsentStatus.REQUIRED,\n isConsentFormAvailable: true,\n canRequestAds: true,\n privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,\n };\n }\n async showPrivacyOptionsForm() {\n console.log('showPrivacyOptionsForm');\n }\n async showConsentForm() {\n console.log('showConsentForm');\n return {\n status: AdmobConsentStatus.REQUIRED,\n canRequestAds: true,\n privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,\n };\n }\n async resetConsentInfo() {\n console.log('resetConsentInfo');\n }\n async setApplicationMuted(options) {\n console.log('setApplicationMuted', options);\n }\n async setApplicationVolume(options) {\n console.log('setApplicationVolume', options);\n }\n async showBanner(options) {\n console.log('showBanner', options);\n }\n async hideBanner() {\n console.log('hideBanner');\n }\n async resumeBanner() {\n console.log('resumeBanner');\n }\n async removeBanner() {\n console.log('removeBanner');\n }\n async prepareInterstitial(options) {\n console.log('prepareInterstitial', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showInterstitial(options) {\n console.log('showInterstitial', options);\n }\n async prepareRewardVideoAd(options) {\n console.log('prepareRewardVideoAd', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardVideoAd(options) {\n console.log('showRewardVideoAd', options);\n return {\n type: '',\n amount: 0,\n };\n }\n async prepareRewardInterstitialAd(options) {\n console.log('prepareRewardInterstitialAd', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardInterstitialAd(options) {\n console.log('showRewardInterstitialAd', options);\n return {\n type: '',\n amount: 0,\n };\n }\n async loadAppOpen(options) {\n console.log('loadAppOpen', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showAppOpen(options) {\n console.log('showAppOpen', options);\n }\n async isAppOpenLoaded() {\n return { value: false };\n }\n addListener(eventName, listenerFunc) {\n void listenerFunc;\n console.log('addListener', eventName);\n return Promise.resolve({ remove: () => Promise.resolve() });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardInterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","AdValuePrecision","AppOpenAdPluginEvents","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,kBAAkB,EAAE;IAC/B;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS;IAC7C;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;IAC/D;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM;IACvC;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;IAC3D,CAAC,EAAEA,0BAAkB,KAAKA,0BAAkB,GAAG,EAAE,CAAC,CAAC;;IClBnD;AACWC;IACX,CAAC,UAAU,oBAAoB,EAAE;IACjC;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,aAAa,CAAC,GAAG,qBAAqB;IAC/D;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;IACrD;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,sBAAsB;IACjE;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;IACrD;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;IACrD;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,oBAAo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AAE;IAC/B,IAAI;IACJ,IAAI,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE;IAEzC,QAAQ,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,SAAS,CAAC;IAC7C,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;IACnE,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/banner/banner-ad-plugin-events.enum.js","esm/banner/banner-ad-position.enum.js","esm/banner/banner-ad-size.enum.js","esm/interstitial/interstitial-ad-plugin-events.enum.js","esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.js","esm/reward/reward-ad-plugin-events.enum.js","esm/consent/consent-status.enum.js","esm/consent/consent-debug-geography.enum.js","esm/shared/ad-mob-revenue-data.interface.js","esm/app-open/app-open-ad-plugin-events.enum.js","esm/index.js","esm/consent/privacy-options-requirement-status.enum.js","esm/web.js"],"sourcesContent":["export var MaxAdContentRating;\n(function (MaxAdContentRating) {\n /**\n * Content suitable for general audiences, including families.\n */\n MaxAdContentRating[\"General\"] = \"General\";\n /**\n * Content suitable for most audiences with parental guidance.\n */\n MaxAdContentRating[\"ParentalGuidance\"] = \"ParentalGuidance\";\n /**\n * Content suitable for teen and older audiences.\n */\n MaxAdContentRating[\"Teen\"] = \"Teen\";\n /**\n * Content suitable only for mature audiences.\n */\n MaxAdContentRating[\"MatureAudience\"] = \"MatureAudience\";\n})(MaxAdContentRating || (MaxAdContentRating = {}));\n//# sourceMappingURL=definitions.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var BannerAdPluginEvents;\n(function (BannerAdPluginEvents) {\n /**\n * Emits when the displayed banner size changes.\n */\n BannerAdPluginEvents[\"SizeChanged\"] = \"bannerAdSizeChanged\";\n /**\n * Emits when a banner ad has loaded.\n */\n BannerAdPluginEvents[\"Loaded\"] = \"bannerAdLoaded\";\n /**\n * Emits when a banner ad fails to load.\n */\n BannerAdPluginEvents[\"FailedToLoad\"] = \"bannerAdFailedToLoad\";\n /**\n * Emits when a banner opens an overlay after the user taps it.\n */\n BannerAdPluginEvents[\"Opened\"] = \"bannerAdOpened\";\n /**\n * Emits when the banner overlay is closed.\n */\n BannerAdPluginEvents[\"Closed\"] = \"bannerAdClosed\";\n /**\n * Emits when an impression is recorded for the banner ad.\n */\n BannerAdPluginEvents[\"AdImpression\"] = \"bannerAdImpression\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n BannerAdPluginEvents[\"AdPaid\"] = \"bannerAdPaid\";\n})(BannerAdPluginEvents || (BannerAdPluginEvents = {}));\n//# sourceMappingURL=banner-ad-plugin-events.enum.js.map","/**\n * @see https://developer.android.com/reference/android/widget/LinearLayout#attr_android:gravity\n */\nexport var BannerAdPosition;\n(function (BannerAdPosition) {\n /**\n * Positions the banner at the top center of the screen.\n */\n BannerAdPosition[\"TOP_CENTER\"] = \"TOP_CENTER\";\n /**\n * Positions the banner at the center of the screen.\n */\n BannerAdPosition[\"CENTER\"] = \"CENTER\";\n /**\n * Positions the banner at the bottom center of the screen.\n */\n BannerAdPosition[\"BOTTOM_CENTER\"] = \"BOTTOM_CENTER\";\n})(BannerAdPosition || (BannerAdPosition = {}));\n//# sourceMappingURL=banner-ad-position.enum.js.map","/**\n * For more information:\n * https://developers.google.com/admob/ios/banner#banner_sizes\n * https://developers.google.com/android/reference/com/google/android/gms/ads/AdSize\n *\n * */\nexport var BannerAdSize;\n(function (BannerAdSize) {\n /**\n * Mobile Marketing Association (MMA)\n * banner ad size (320x50 density-independent pixels).\n */\n BannerAdSize[\"BANNER\"] = \"BANNER\";\n /**\n * Interactive Advertising Bureau (IAB)\n * full banner ad size (468x60 density-independent pixels).\n */\n BannerAdSize[\"FULL_BANNER\"] = \"FULL_BANNER\";\n /**\n * Large banner ad size (320x100 density-independent pixels).\n */\n BannerAdSize[\"LARGE_BANNER\"] = \"LARGE_BANNER\";\n /**\n * Interactive Advertising Bureau (IAB)\n * medium rectangle ad size (300x250 density-independent pixels).\n */\n BannerAdSize[\"MEDIUM_RECTANGLE\"] = \"MEDIUM_RECTANGLE\";\n /**\n * Interactive Advertising Bureau (IAB)\n * leaderboard ad size (728x90 density-independent pixels).\n */\n BannerAdSize[\"LEADERBOARD\"] = \"LEADERBOARD\";\n /**\n * A dynamically sized banner that is full-width and auto-height.\n */\n BannerAdSize[\"ADAPTIVE_BANNER\"] = \"ADAPTIVE_BANNER\";\n /**\n * A legacy smart banner sized to the screen width.\n * Retained for compatibility; use `ADAPTIVE_BANNER` for new integrations.\n *\n * @deprecated Use `ADAPTIVE_BANNER` instead.\n */\n BannerAdSize[\"SMART_BANNER\"] = \"SMART_BANNER\";\n})(BannerAdSize || (BannerAdSize = {}));\n//# sourceMappingURL=banner-ad-size.enum.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var InterstitialAdPluginEvents;\n(function (InterstitialAdPluginEvents) {\n /**\n * Emits when an interstitial ad has loaded and is ready to show.\n */\n InterstitialAdPluginEvents[\"Loaded\"] = \"interstitialAdLoaded\";\n /**\n * Emits when an interstitial ad fails to load.\n */\n InterstitialAdPluginEvents[\"FailedToLoad\"] = \"interstitialAdFailedToLoad\";\n /**\n * Emits when an interstitial ad is shown.\n */\n InterstitialAdPluginEvents[\"Showed\"] = \"interstitialAdShowed\";\n /**\n * Emits when a loaded interstitial ad fails to show.\n */\n InterstitialAdPluginEvents[\"FailedToShow\"] = \"interstitialAdFailedToShow\";\n /**\n * Emits when an interstitial ad is dismissed.\n */\n InterstitialAdPluginEvents[\"Dismissed\"] = \"interstitialAdDismissed\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n InterstitialAdPluginEvents[\"AdImpression\"] = \"interstitialAdImpression\";\n})(InterstitialAdPluginEvents || (InterstitialAdPluginEvents = {}));\n//# sourceMappingURL=interstitial-ad-plugin-events.enum.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var RewardInterstitialAdPluginEvents;\n(function (RewardInterstitialAdPluginEvents) {\n /**\n * Emits when a rewarded interstitial ad has loaded and is ready to show.\n */\n RewardInterstitialAdPluginEvents[\"Loaded\"] = \"onRewardedInterstitialAdLoaded\";\n /**\n * Emits when a rewarded interstitial ad fails to load.\n */\n RewardInterstitialAdPluginEvents[\"FailedToLoad\"] = \"onRewardedInterstitialAdFailedToLoad\";\n /**\n * Emits when a rewarded interstitial ad is shown.\n */\n RewardInterstitialAdPluginEvents[\"Showed\"] = \"onRewardedInterstitialAdShowed\";\n /**\n * Emits when a loaded rewarded interstitial ad fails to show.\n */\n RewardInterstitialAdPluginEvents[\"FailedToShow\"] = \"onRewardedInterstitialAdFailedToShow\";\n /**\n * Emits when a rewarded interstitial ad is dismissed.\n *\n * This event does not indicate whether the user earned a reward. Listen for\n * `Rewarded` separately before granting the reward.\n */\n RewardInterstitialAdPluginEvents[\"Dismissed\"] = \"onRewardedInterstitialAdDismissed\";\n /**\n * Emits when the user earns the advertised reward.\n */\n RewardInterstitialAdPluginEvents[\"Rewarded\"] = \"onRewardedInterstitialAdReward\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n RewardInterstitialAdPluginEvents[\"AdImpression\"] = \"onRewardedInterstitialAdImpression\";\n})(RewardInterstitialAdPluginEvents || (RewardInterstitialAdPluginEvents = {}));\n//# sourceMappingURL=reward-interstitial-ad-plugin-events.enum.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var RewardAdPluginEvents;\n(function (RewardAdPluginEvents) {\n /**\n * Emits when the SDK records a click on a rewarded ad.\n */\n RewardAdPluginEvents[\"adClicked\"] = \"onRewardedVideoAdClicked\";\n /**\n * Emits when a rewarded ad has loaded and is ready to show.\n */\n RewardAdPluginEvents[\"Loaded\"] = \"onRewardedVideoAdLoaded\";\n /**\n * Emits when a rewarded ad fails to load.\n */\n RewardAdPluginEvents[\"FailedToLoad\"] = \"onRewardedVideoAdFailedToLoad\";\n /**\n * Emits when a rewarded ad is shown.\n */\n RewardAdPluginEvents[\"Showed\"] = \"onRewardedVideoAdShowed\";\n /**\n * Emits when a loaded rewarded ad fails to show.\n */\n RewardAdPluginEvents[\"FailedToShow\"] = \"onRewardedVideoAdFailedToShow\";\n /**\n * Emits when a rewarded ad is dismissed.\n *\n * This event does not indicate whether the user earned a reward. Listen for\n * `Rewarded` separately before granting the reward.\n */\n RewardAdPluginEvents[\"Dismissed\"] = \"onRewardedVideoAdDismissed\";\n /**\n * Emits when the user earns the advertised reward.\n */\n RewardAdPluginEvents[\"Rewarded\"] = \"onRewardedVideoAdReward\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n RewardAdPluginEvents[\"AdImpression\"] = \"onRewardedVideoAdImpression\";\n})(RewardAdPluginEvents || (RewardAdPluginEvents = {}));\n//# sourceMappingURL=reward-ad-plugin-events.enum.js.map","/**\n * For more information:\n * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#consentstatus\n *\n * */\nexport var AdmobConsentStatus;\n(function (AdmobConsentStatus) {\n /**\n * User consent not required.\n */\n AdmobConsentStatus[\"NOT_REQUIRED\"] = \"NOT_REQUIRED\";\n /**\n * User consent already obtained.\n */\n AdmobConsentStatus[\"OBTAINED\"] = \"OBTAINED\";\n /**\n * User consent required but not yet obtained.\n */\n AdmobConsentStatus[\"REQUIRED\"] = \"REQUIRED\";\n /**\n * Unknown consent status, AdsConsent.requestInfoUpdate needs to be called to update it.\n */\n AdmobConsentStatus[\"UNKNOWN\"] = \"UNKNOWN\";\n})(AdmobConsentStatus || (AdmobConsentStatus = {}));\n//# sourceMappingURL=consent-status.enum.js.map","/**\n * For more information:\n * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#debuggeography\n *\n * */\nexport var AdmobConsentDebugGeography;\n(function (AdmobConsentDebugGeography) {\n /**\n * Debug geography disabled.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"DISABLED\"] = 0] = \"DISABLED\";\n /**\n * Geography appears as in EEA for debug devices.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"EEA\"] = 1] = \"EEA\";\n /**\n * Geography appears as not in EEA for debug devices.\n * @deprecated\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"NOT_EEA\"] = 2] = \"NOT_EEA\";\n /**\n * Geography appears as in regulated US state for debug devices.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"US\"] = 3] = \"US\";\n /**\n * Geography appears as OTHER state for debug devices.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"OTHER\"] = 4] = \"OTHER\";\n})(AdmobConsentDebugGeography || (AdmobConsentDebugGeography = {}));\n//# sourceMappingURL=consent-debug-geography.enum.js.map","/**\n * The precision of an impression-level ad value.\n */\nexport var AdValuePrecision;\n(function (AdValuePrecision) {\n /**\n * The ad value precision is unknown.\n */\n AdValuePrecision[AdValuePrecision[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * The ad value is estimated from aggregated data.\n */\n AdValuePrecision[AdValuePrecision[\"Estimated\"] = 1] = \"Estimated\";\n /**\n * The ad value was provided by the publisher.\n */\n AdValuePrecision[AdValuePrecision[\"PublisherProvided\"] = 2] = \"PublisherProvided\";\n /**\n * The ad value is the precise value paid for this ad.\n */\n AdValuePrecision[AdValuePrecision[\"Precise\"] = 3] = \"Precise\";\n})(AdValuePrecision || (AdValuePrecision = {}));\n//# sourceMappingURL=ad-mob-revenue-data.interface.js.map","export var AppOpenAdPluginEvents;\n(function (AppOpenAdPluginEvents) {\n /**\n * Emits when an App Open ad has loaded.\n */\n AppOpenAdPluginEvents[\"Loaded\"] = \"appOpenAdLoaded\";\n /**\n * Emits when an App Open ad fails to load.\n */\n AppOpenAdPluginEvents[\"FailedToLoad\"] = \"appOpenAdFailedToLoad\";\n /**\n * Emits when an App Open ad is shown.\n */\n AppOpenAdPluginEvents[\"Opened\"] = \"appOpenAdOpened\";\n /**\n * Emits when an App Open ad is dismissed.\n */\n AppOpenAdPluginEvents[\"Closed\"] = \"appOpenAdClosed\";\n /**\n * Emits when a loaded App Open ad fails to show.\n */\n AppOpenAdPluginEvents[\"FailedToShow\"] = \"appOpenAdFailedToShow\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n AppOpenAdPluginEvents[\"AdImpression\"] = \"appOpenAdImpression\";\n})(AppOpenAdPluginEvents || (AppOpenAdPluginEvents = {}));\n//# sourceMappingURL=app-open-ad-plugin-events.enum.js.map","import { registerPlugin } from '@capacitor/core';\nconst AdMob = registerPlugin('AdMob', {\n web: () => import('./web').then((m) => new m.AdMobWeb()),\n});\nexport * from './definitions';\nexport * from './banner/index';\nexport * from './interstitial/index';\nexport * from './reward-interstitial/index';\nexport * from './reward/index';\nexport * from './consent/index';\nexport * from './shared/index';\nexport * from './app-open/index';\nexport { AdMob };\n//# sourceMappingURL=index.js.map","/**\n * For more information:\n * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#privacyoptionsrequirementstatus\n *\n * */\nexport var PrivacyOptionsRequirementStatus;\n(function (PrivacyOptionsRequirementStatus) {\n /**\n * Privacy options entry point is not required.\n */\n PrivacyOptionsRequirementStatus[\"NOT_REQUIRED\"] = \"NOT_REQUIRED\";\n /**\n * Privacy options entry point is required.\n */\n PrivacyOptionsRequirementStatus[\"REQUIRED\"] = \"REQUIRED\";\n /**\n * Privacy options requirement status is unknown.\n */\n PrivacyOptionsRequirementStatus[\"UNKNOWN\"] = \"UNKNOWN\";\n})(PrivacyOptionsRequirementStatus || (PrivacyOptionsRequirementStatus = {}));\n//# sourceMappingURL=privacy-options-requirement-status.enum.js.map","import { WebPlugin } from '@capacitor/core';\nimport { AdmobConsentStatus } from './consent/consent-status.enum';\nimport { PrivacyOptionsRequirementStatus } from './consent/privacy-options-requirement-status.enum';\nexport class AdMobWeb extends WebPlugin {\n async initialize() {\n console.log('initialize');\n }\n async requestTrackingAuthorization() {\n console.log('requestTrackingAuthorization');\n }\n async trackingAuthorizationStatus() {\n return {\n status: 'authorized',\n };\n }\n async requestConsentInfo(options) {\n console.log('requestConsentInfo', options);\n return {\n status: AdmobConsentStatus.REQUIRED,\n isConsentFormAvailable: true,\n canRequestAds: true,\n privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,\n };\n }\n async showPrivacyOptionsForm() {\n console.log('showPrivacyOptionsForm');\n }\n async showConsentForm() {\n console.log('showConsentForm');\n return {\n status: AdmobConsentStatus.REQUIRED,\n canRequestAds: true,\n privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,\n };\n }\n async resetConsentInfo() {\n console.log('resetConsentInfo');\n }\n async setApplicationMuted(options) {\n console.log('setApplicationMuted', options);\n }\n async setApplicationVolume(options) {\n console.log('setApplicationVolume', options);\n }\n async showBanner(options) {\n console.log('showBanner', options);\n }\n async hideBanner() {\n console.log('hideBanner');\n }\n async resumeBanner() {\n console.log('resumeBanner');\n }\n async removeBanner() {\n console.log('removeBanner');\n }\n async prepareInterstitial(options) {\n console.log('prepareInterstitial', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showInterstitial(options) {\n console.log('showInterstitial', options);\n }\n async prepareRewardVideoAd(options) {\n console.log('prepareRewardVideoAd', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardVideoAd(options) {\n console.log('showRewardVideoAd', options);\n return {\n type: '',\n amount: 0,\n };\n }\n async prepareRewardInterstitialAd(options) {\n console.log('prepareRewardInterstitialAd', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardInterstitialAd(options) {\n console.log('showRewardInterstitialAd', options);\n return {\n type: '',\n amount: 0,\n };\n }\n async loadAppOpen(options) {\n console.log('loadAppOpen', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showAppOpen(options) {\n console.log('showAppOpen', options);\n }\n async isAppOpenLoaded() {\n return { value: false };\n }\n addListener(eventName, listenerFunc) {\n void listenerFunc;\n console.log('addListener', eventName);\n return Promise.resolve({ remove: () => Promise.resolve() });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardInterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","AdValuePrecision","AppOpenAdPluginEvents","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,kBAAkB,EAAE;IAC/B;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS;IAC7C;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;IAC/D;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM;IACvC;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;IAC3D,CAAC,EAAEA,0BAAkB,KAAKA,0BAAkB,GAAG,EAAE,CAAC,CAAC;;IClBnD;AACWC;IACX,CAAC,UAAU,oBAAoB,EAAE;IACjC;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,aAAa,CAAC,GAAG,qBAAqB;IAC/D;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;IACrD;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,sBAAsB;IACjE;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;IACrD;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;IACrD;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,oBAAoB;IAC/D;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,cAAc;IACnD,CAAC,EAAEA,4BAAoB,KAAKA,4BAAoB,GAAG,EAAE,CAAC,CAAC;;IC/BvD;IACA;IACA;AACWC;IACX,CAAC,UAAU,gBAAgB,EAAE;IAC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IAC7C,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;IACnE,IAAI;IACJ;;;;;;;;;;;"}
|
package/docs/app-open.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# App Open Ads
|
|
2
|
+
|
|
3
|
+
App open ads monetize app-load screens and are designed to show when the user brings the app to the foreground. The user can close them at any time. Google's app open guides for [Android](https://developers.google.com/admob/android/app-open) and [iOS](https://developers.google.com/admob/ios/app-open) explain the format.
|
|
4
|
+
|
|
5
|
+
Call this after [initialize](https://docs.rdlabo.dev/projects/capacitor-admob/docs/configuration) and [consent](https://docs.rdlabo.dev/projects/capacitor-admob/docs/consent). Load the ad ahead of time and confirm it is available before presentation. Do not block app startup indefinitely while waiting for an ad to load.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import {
|
|
9
|
+
AdLoadInfo,
|
|
10
|
+
AdMob,
|
|
11
|
+
AdMobRevenueData,
|
|
12
|
+
AppOpenAdOptions,
|
|
13
|
+
AppOpenAdPluginEvents,
|
|
14
|
+
} from '@capacitor-community/admob';
|
|
15
|
+
|
|
16
|
+
await AdMob.addListener(AppOpenAdPluginEvents.Loaded, (info: AdLoadInfo) => {
|
|
17
|
+
console.log('App Open Ad loaded', info.adUnitId);
|
|
18
|
+
});
|
|
19
|
+
await AdMob.addListener(AppOpenAdPluginEvents.FailedToLoad, console.error);
|
|
20
|
+
await AdMob.addListener(AppOpenAdPluginEvents.Opened, () => {
|
|
21
|
+
console.log('App Open Ad open');
|
|
22
|
+
});
|
|
23
|
+
await AdMob.addListener(AppOpenAdPluginEvents.Closed, () => {
|
|
24
|
+
console.log('App Open Ad close');
|
|
25
|
+
});
|
|
26
|
+
await AdMob.addListener(AppOpenAdPluginEvents.FailedToShow, console.error);
|
|
27
|
+
await AdMob.addListener(AppOpenAdPluginEvents.AdImpression, (data: AdMobRevenueData) => {
|
|
28
|
+
console.log(data);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const options: AppOpenAdOptions = {
|
|
32
|
+
adId: 'YOUR_AD_UNIT_ID',
|
|
33
|
+
};
|
|
34
|
+
const { adUnitId } = await AdMob.loadAppOpen(options);
|
|
35
|
+
const { value: isLoaded } = await AdMob.isAppOpenLoaded({ adId: adUnitId });
|
|
36
|
+
if (isLoaded) {
|
|
37
|
+
await AdMob.showAppOpen({ adId: adUnitId });
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
<!-- !::loadAppOpen:: -->
|
|
42
|
+
|
|
43
|
+
<!-- !::isAppOpenLoaded:: -->
|
|
44
|
+
|
|
45
|
+
<!-- !::showAppOpen:: -->
|
|
46
|
+
|
|
47
|
+
<!-- !::AppOpenAdOptions:: -->
|
|
48
|
+
|
|
49
|
+
There is no `isTesting` flag; during development set `adId` to Google's [App Open demo ad unit](https://developers.google.com/admob/android/test-ads#demo_ad_units).
|
|
50
|
+
|
|
51
|
+
Use the `Closed` event to resume your app flow and begin loading the next ad.
|
|
52
|
+
|
|
53
|
+
When no `adId` is passed to `showAppOpen()` or `isAppOpenLoaded()`, the most recently loaded ad is targeted. See [Ad Events](https://docs.rdlabo.dev/projects/capacitor-admob/docs/events) for the event list.
|
package/docs/banner.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Banner Ads
|
|
2
|
+
|
|
3
|
+
Banner ads are rectangular ads that occupy a portion of an app's layout. They can stay on screen while the user interacts with the app, typically anchored at the top or bottom. Google's banner guides for [Android](https://developers.google.com/admob/android/banner) and [iOS](https://developers.google.com/admob/ios/banner) explain the format.
|
|
4
|
+
|
|
5
|
+
Call this after [initialize](https://docs.rdlabo.dev/projects/capacitor-admob/docs/configuration) and [consent](https://docs.rdlabo.dev/projects/capacitor-admob/docs/consent). This plugin draws the banner on the native screen (above the web view). Register listeners before calling `showBanner` so the first load and size events are not missed.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import {
|
|
9
|
+
AdMob,
|
|
10
|
+
AdMobBannerSize,
|
|
11
|
+
AdMobRevenueData,
|
|
12
|
+
BannerAdOptions,
|
|
13
|
+
BannerAdPluginEvents,
|
|
14
|
+
BannerAdPosition,
|
|
15
|
+
BannerAdSize,
|
|
16
|
+
} from '@capacitor-community/admob';
|
|
17
|
+
|
|
18
|
+
const handles = await Promise.all([
|
|
19
|
+
AdMob.addListener(BannerAdPluginEvents.Loaded, () => {
|
|
20
|
+
console.log('Banner loaded');
|
|
21
|
+
}),
|
|
22
|
+
AdMob.addListener(BannerAdPluginEvents.SizeChanged, (size: AdMobBannerSize) => {
|
|
23
|
+
console.log('Banner size', size.width, size.height);
|
|
24
|
+
// Inset your layout by size.height; see the next section.
|
|
25
|
+
}),
|
|
26
|
+
AdMob.addListener(BannerAdPluginEvents.FailedToLoad, (error) => {
|
|
27
|
+
console.error(error);
|
|
28
|
+
}),
|
|
29
|
+
AdMob.addListener(BannerAdPluginEvents.AdPaid, (data: AdMobRevenueData) => {
|
|
30
|
+
// Forward impression-level revenue to your analytics provider.
|
|
31
|
+
console.log(data);
|
|
32
|
+
}),
|
|
33
|
+
]);
|
|
34
|
+
|
|
35
|
+
const options: BannerAdOptions = {
|
|
36
|
+
adId: 'YOUR_AD_UNIT_ID',
|
|
37
|
+
adSize: BannerAdSize.ADAPTIVE_BANNER,
|
|
38
|
+
position: BannerAdPosition.BOTTOM_CENTER,
|
|
39
|
+
margin: 0,
|
|
40
|
+
// isTesting: true,
|
|
41
|
+
// npa: true,
|
|
42
|
+
};
|
|
43
|
+
await AdMob.showBanner(options);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
<!-- !::showBanner:: -->
|
|
47
|
+
|
|
48
|
+
<!-- !::BannerAdOptions:: -->
|
|
49
|
+
|
|
50
|
+
<!-- !::BannerAdSize:: -->
|
|
51
|
+
|
|
52
|
+
<!-- !::BannerAdPosition:: -->
|
|
53
|
+
|
|
54
|
+
## Keep content out from under the banner
|
|
55
|
+
|
|
56
|
+
The banner is drawn on the native screen above the WebView. HTML layout does not move on its own. Inset your own root by `size.height` (logical pixels). Use padding or margin on the bottom for `BOTTOM_CENTER`, and on the top for `TOP_CENTER`.
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<main id="content">Your app</main>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { AdMob, BannerAdPluginEvents } from '@capacitor-community/admob';
|
|
64
|
+
|
|
65
|
+
const content = document.getElementById('content');
|
|
66
|
+
|
|
67
|
+
await AdMob.addListener(BannerAdPluginEvents.SizeChanged, (size) => {
|
|
68
|
+
if (!content) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
content.style.paddingBottom = size.height > 0 ? `${size.height}px` : '';
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
When the height is `0` (hidden, removed, or failed), clear the inset. Apply the same idea to whatever element fills the WebView in your framework.
|
|
76
|
+
|
|
77
|
+
See [Testing](https://docs.rdlabo.dev/projects/capacitor-admob/docs/testing) for `isTesting`.
|
|
78
|
+
|
|
79
|
+
## Lifecycle
|
|
80
|
+
|
|
81
|
+
- `hideBanner()` temporarily hides the current banner.
|
|
82
|
+
- `resumeBanner()` shows a hidden banner again.
|
|
83
|
+
- `removeBanner()` destroys it. Call `showBanner()` to create another one.
|
|
84
|
+
|
|
85
|
+
<!-- !::hideBanner:: -->
|
|
86
|
+
|
|
87
|
+
<!-- !::resumeBanner:: -->
|
|
88
|
+
|
|
89
|
+
<!-- !::removeBanner:: -->
|
|
90
|
+
|
|
91
|
+
Release listener handles when the owning screen is destroyed:
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
for (const handle of handles) {
|
|
95
|
+
await handle.remove();
|
|
96
|
+
}
|
|
97
|
+
await AdMob.removeBanner();
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Banner impression-level revenue is emitted on `BannerAdPluginEvents.AdPaid`. Full-screen formats emit the same `AdMobRevenueData` through their `AdImpression` event. See [Ad Events](https://docs.rdlabo.dev/projects/capacitor-admob/docs/events).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
Call the plugin's `initialize` once before requesting ads. You do not start the native SDK yourself.
|
|
4
|
+
|
|
5
|
+
Native application IDs belong in AndroidManifest / Info.plist; see [Installation](https://docs.rdlabo.dev/projects/capacitor-admob/docs/readme#installation).
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { AdMob } from '@capacitor-community/admob';
|
|
9
|
+
|
|
10
|
+
try {
|
|
11
|
+
await AdMob.initialize();
|
|
12
|
+
} catch (error) {
|
|
13
|
+
console.error('AdMob initialization failed', error);
|
|
14
|
+
// Skip ad requests for now. Retry after the app's native view is available.
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
On Android, initialization also waits for the native banner parent view, even if your app only uses full-screen ads. It rejects if the activity/content view is unavailable, or if the parent does not appear within 5 seconds. Handle this rejection so an ad initialization failure does not prevent the rest of your app from starting. You can retry once the native view is available.
|
|
19
|
+
|
|
20
|
+
A resolved `initialize()` does not mean an ad has loaded. Use each format's load method and events to check ad readiness.
|
|
21
|
+
|
|
22
|
+
<!-- !::initialize:: -->
|
|
23
|
+
|
|
24
|
+
<!-- !::AdMobInitializationOptions:: -->
|
|
25
|
+
|
|
26
|
+
During development, prefer Google [demo ad units](https://developers.google.com/admob/android/test-ads#demo_ad_units). To test production-like ads on a physical device, register that device as described in [Testing](https://docs.rdlabo.dev/projects/capacitor-admob/docs/testing). Do not ship `initializeForTesting: true` in production.
|
|
27
|
+
|
|
28
|
+
Per-ad options such as `isTesting`, `npa` (non-personalized ads), and `immersiveMode` (hide Android system bars on a full-screen ad) are set on each ad request, not on `initialize`. See the per-format guides.
|
|
29
|
+
|
|
30
|
+
After initialization, request privacy consent before loading ads. See [Consent](https://docs.rdlabo.dev/projects/capacitor-admob/docs/consent).
|
package/docs/consent.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Consent
|
|
2
|
+
|
|
3
|
+
Google's User Messaging Platform (UMP) SDK is the privacy and messaging tool for gathering consent before you request ads. Google's UMP guides for [Android](https://developers.google.com/admob/android/privacy) and [iOS](https://developers.google.com/admob/ios/privacy) explain the flow.
|
|
4
|
+
|
|
5
|
+
This plugin exposes UMP and iOS App Tracking Transparency through one API. Before using UMP, [create your GDPR (General Data Protection Regulation) messages](https://support.google.com/admob/answer/10113207) in AdMob. You may also [set up Identifier for Advertisers (IDFA) messages](https://support.google.com/admob/answer/10115027). When IDFA messages are published, UMP presents them and the App Tracking Transparency prompt; do not also call `requestTrackingAuthorization()`.
|
|
6
|
+
|
|
7
|
+
## Recommended order
|
|
8
|
+
|
|
9
|
+
1. Call `AdMob.initialize()`. See [Configuration](https://docs.rdlabo.dev/projects/capacitor-admob/docs/configuration).
|
|
10
|
+
2. Call `AdMob.requestConsentInfo()`.
|
|
11
|
+
3. If required, call `AdMob.showConsentForm()`.
|
|
12
|
+
4. Load ads only when `consentInfo.canRequestAds` is `true`.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { AdMob, AdmobConsentStatus } from '@capacitor-community/admob';
|
|
16
|
+
|
|
17
|
+
await AdMob.initialize();
|
|
18
|
+
|
|
19
|
+
let consentInfo = await AdMob.requestConsentInfo();
|
|
20
|
+
if (consentInfo.isConsentFormAvailable && consentInfo.status === AdmobConsentStatus.REQUIRED) {
|
|
21
|
+
consentInfo = await AdMob.showConsentForm();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (consentInfo.canRequestAds) {
|
|
25
|
+
// Ads may now be requested.
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
<!-- !::requestConsentInfo:: -->
|
|
30
|
+
|
|
31
|
+
<!-- !::AdmobConsentRequestOptions:: -->
|
|
32
|
+
|
|
33
|
+
<!-- !::AdmobConsentInfo:: -->
|
|
34
|
+
|
|
35
|
+
<!-- !::AdmobConsentStatus:: -->
|
|
36
|
+
|
|
37
|
+
<!-- !::showConsentForm:: -->
|
|
38
|
+
|
|
39
|
+
Use `canRequestAds` as the decision point. A consent form may be unavailable or unnecessary depending on the user and the messages you configured.
|
|
40
|
+
|
|
41
|
+
## iOS tracking authorization
|
|
42
|
+
|
|
43
|
+
If you are **not** using UMP IDFA messages, request App Tracking Transparency yourself when the status is `notDetermined`. Skip this section when Identifier for Advertisers messages are configured in AdMob; UMP shows that prompt.
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
const tracking = await AdMob.trackingAuthorizationStatus();
|
|
47
|
+
if (tracking.status === 'notDetermined') {
|
|
48
|
+
/**
|
|
49
|
+
* If you want to explain tracking before the iOS dialog,
|
|
50
|
+
* present your own UI here, then continue.
|
|
51
|
+
*/
|
|
52
|
+
await AdMob.requestTrackingAuthorization();
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`requestTrackingAuthorization()` does nothing on Android, web, and iOS versions before 14.
|
|
57
|
+
|
|
58
|
+
<!-- !::trackingAuthorizationStatus:: -->
|
|
59
|
+
|
|
60
|
+
<!-- !::TrackingAuthorizationStatusInterface:: -->
|
|
61
|
+
|
|
62
|
+
<!-- !::requestTrackingAuthorization:: -->
|
|
63
|
+
|
|
64
|
+
## Privacy options
|
|
65
|
+
|
|
66
|
+
If your privacy message requires an in-app entry point, expose a settings action that calls:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
await AdMob.showPrivacyOptionsForm();
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
<!-- !::showPrivacyOptionsForm:: -->
|
|
73
|
+
|
|
74
|
+
## Reset consent
|
|
75
|
+
|
|
76
|
+
`resetConsentInfo()` is intended for testing. Do not use it to clear a production user's consent choice.
|
|
77
|
+
|
|
78
|
+
<!-- !::resetConsentInfo:: -->
|
|
79
|
+
|
|
80
|
+
For debug geography and test device IDs, see [Testing](https://docs.rdlabo.dev/projects/capacitor-admob/docs/testing).
|
package/docs/events.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Ad Events
|
|
2
|
+
|
|
3
|
+
Google documents these lifecycle callbacks on each format page, for example [banner ad events](https://developers.google.com/admob/android/banner#ad_events). This plugin exposes the same moments under the names in the table below, not the native `AdListener` method names. For the paid payload, see [impression-level ad revenue](https://developers.google.com/admob/android/impression-level-ad-revenue) ([iOS](https://developers.google.com/admob/ios/impression-level-ad-revenue)).
|
|
4
|
+
|
|
5
|
+
Register listeners before loading or showing an ad so that the first lifecycle and impression events are not missed.
|
|
6
|
+
|
|
7
|
+
## Adding and removing listeners
|
|
8
|
+
|
|
9
|
+
`AdMob.addListener` returns a handle. Await the registration, then call `remove()` when the owning screen is destroyed:
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { AdMob, BannerAdPluginEvents } from '@capacitor-community/admob';
|
|
13
|
+
|
|
14
|
+
const handle = await AdMob.addListener(BannerAdPluginEvents.Loaded, () => {
|
|
15
|
+
console.log('Banner loaded');
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
await handle.remove();
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
<!-- !::PluginListenerHandle:: -->
|
|
22
|
+
|
|
23
|
+
## Common lifecycle events
|
|
24
|
+
|
|
25
|
+
| Event | Emitted when |
|
|
26
|
+
| ------------------------- | ------------------------------------------------------ |
|
|
27
|
+
| `Loaded` | The ad finished loading and is ready to show. |
|
|
28
|
+
| `FailedToLoad` | The ad could not load. Check `AdMobError` for details. |
|
|
29
|
+
| `Showed` / `Opened` | The ad became visible to the user. |
|
|
30
|
+
| `FailedToShow` | A loaded ad failed to display. |
|
|
31
|
+
| `Dismissed` / `Closed` | The user closed the full-screen ad or overlay. |
|
|
32
|
+
| `Rewarded` | The user earned the advertised reward. |
|
|
33
|
+
| `SizeChanged` | Banner dimensions changed. |
|
|
34
|
+
| `AdImpression` / `AdPaid` | An impression was recorded. See revenue events below. |
|
|
35
|
+
|
|
36
|
+
## Errors
|
|
37
|
+
|
|
38
|
+
`FailedToLoad` and `FailedToShow` listeners receive an `AdMobError` payload.
|
|
39
|
+
|
|
40
|
+
<!-- !::AdMobError:: -->
|
|
41
|
+
|
|
42
|
+
## Impression-level revenue
|
|
43
|
+
|
|
44
|
+
Full-screen formats emit `AdMobRevenueData` on their `AdImpression` event. Banners emit the same payload on `AdPaid`. Banner `AdImpression` has no payload; it only signals that an impression was recorded.
|
|
45
|
+
|
|
46
|
+
`valueMicros` is an integer in millionths of the currency identified by `currencyCode`: divide by `1_000_000` for currency units. The iOS conversion was corrected in 8.1.0; see [Migration](https://docs.rdlabo.dev/projects/capacitor-admob/docs/migration) if your analytics compensates for the previous values.
|
|
47
|
+
|
|
48
|
+
<!-- !::AdMobRevenueData:: -->
|
|
49
|
+
|
|
50
|
+
## Per-format guides
|
|
51
|
+
|
|
52
|
+
- [App Open Ads](https://docs.rdlabo.dev/projects/capacitor-admob/docs/app-open)
|
|
53
|
+
- [Banner Ads](https://docs.rdlabo.dev/projects/capacitor-admob/docs/banner)
|
|
54
|
+
- [Interstitial Ads](https://docs.rdlabo.dev/projects/capacitor-admob/docs/interstitial)
|
|
55
|
+
- [Rewarded Ads](https://docs.rdlabo.dev/projects/capacitor-admob/docs/rewarded)
|
|
56
|
+
|
|
57
|
+
<!-- !::addListener.AppOpenAdPluginEvents:: -->
|
|
58
|
+
|
|
59
|
+
<!-- !::AppOpenAdPluginEvents:: -->
|
|
60
|
+
|
|
61
|
+
<!-- !::addListener.BannerAdPluginEvents:: -->
|
|
62
|
+
|
|
63
|
+
<!-- !::BannerAdPluginEvents:: -->
|
|
64
|
+
|
|
65
|
+
<!-- !::addListener.InterstitialAdPluginEvents:: -->
|
|
66
|
+
|
|
67
|
+
<!-- !::InterstitialAdPluginEvents:: -->
|
|
68
|
+
|
|
69
|
+
<!-- !::addListener.RewardAdPluginEvents:: -->
|
|
70
|
+
|
|
71
|
+
<!-- !::RewardAdPluginEvents:: -->
|
|
72
|
+
|
|
73
|
+
<!-- !::addListener.RewardInterstitialAdPluginEvents:: -->
|
|
74
|
+
|
|
75
|
+
<!-- !::RewardInterstitialAdPluginEvents:: -->
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Interstitial Ads
|
|
2
|
+
|
|
3
|
+
Interstitial ads are full-screen ads that cover the host app. Show them at a natural transition, such as between activities or game levels. The user can tap through or close the ad and return to the app. Google's interstitial guides for [Android](https://developers.google.com/admob/android/interstitial) and [iOS](https://developers.google.com/admob/ios/interstitial) explain the format.
|
|
4
|
+
|
|
5
|
+
Use an interstitial when the user should not receive an in-app reward. Call this after [initialize](https://docs.rdlabo.dev/projects/capacitor-admob/docs/configuration) and [consent](https://docs.rdlabo.dev/projects/capacitor-admob/docs/consent). Prepare the ad ahead of time, register listeners first, and show it only when it is ready.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { AdLoadInfo, AdMob, AdMobRevenueData, AdOptions, InterstitialAdPluginEvents } from '@capacitor-community/admob';
|
|
9
|
+
|
|
10
|
+
await AdMob.addListener(InterstitialAdPluginEvents.Loaded, (info: AdLoadInfo) => {
|
|
11
|
+
console.log('Interstitial loaded', info.adUnitId);
|
|
12
|
+
});
|
|
13
|
+
await AdMob.addListener(InterstitialAdPluginEvents.FailedToLoad, console.error);
|
|
14
|
+
await AdMob.addListener(InterstitialAdPluginEvents.AdImpression, (data: AdMobRevenueData) => {
|
|
15
|
+
console.log(data);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const options: AdOptions = {
|
|
19
|
+
adId: 'YOUR_AD_UNIT_ID',
|
|
20
|
+
// isTesting: true,
|
|
21
|
+
// npa: true,
|
|
22
|
+
// immersiveMode: true,
|
|
23
|
+
};
|
|
24
|
+
const { adUnitId } = await AdMob.prepareInterstitial(options);
|
|
25
|
+
await AdMob.showInterstitial({ adId: adUnitId });
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
<!-- !::prepareInterstitial:: -->
|
|
29
|
+
|
|
30
|
+
<!-- !::showInterstitial:: -->
|
|
31
|
+
|
|
32
|
+
<!-- !::AdOptions:: -->
|
|
33
|
+
|
|
34
|
+
When no `adId` is passed to `showInterstitial()`, the most recently prepared ad is shown.
|
|
35
|
+
|
|
36
|
+
## Prepare more than one ad
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
await AdMob.prepareInterstitial({ adId: 'ca-app-pub-xxx/interstitial-1' });
|
|
40
|
+
await AdMob.prepareInterstitial({ adId: 'ca-app-pub-xxx/interstitial-2' });
|
|
41
|
+
|
|
42
|
+
await AdMob.showInterstitial({ adId: 'ca-app-pub-xxx/interstitial-1' });
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
See [Testing](https://docs.rdlabo.dev/projects/capacitor-admob/docs/testing) for `isTesting`.
|
|
46
|
+
|
|
47
|
+
Load, show, dismissal, and failure events are listed on [Ad Events](https://docs.rdlabo.dev/projects/capacitor-admob/docs/events).
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Migration Guide
|
|
2
|
+
|
|
3
|
+
## Changes in 8.1.0
|
|
4
|
+
|
|
5
|
+
### Capacitor 8.5 or later is required
|
|
6
|
+
|
|
7
|
+
Update `@capacitor/core`, `@capacitor/cli`, and the native platform packages you use (`@capacitor/android` / `@capacitor/ios`) to 8.5 or later within v8, then run `npx cap sync`.
|
|
8
|
+
|
|
9
|
+
Older Capacitor versions can consume Android window insets before they reach a banner. Update Capacitor to use its current safe-area handling. Follow the [Capacitor 8.5 update guide](https://capacitorjs.com/docs/updating/8-5) for native project migration steps.
|
|
10
|
+
|
|
11
|
+
### Android initialization can reject
|
|
12
|
+
|
|
13
|
+
`AdMob.initialize()` now waits for the native banner parent view. If it does not appear within 5 seconds, initialization rejects; an unavailable activity/content view can fail immediately. This also applies to apps that only use full-screen ads. Previously, a missing child view could let initialization resolve and cause later banner requests to crash.
|
|
14
|
+
|
|
15
|
+
Handle initialization errors without blocking app startup. Retry when the native view is available. See [Configuration](https://docs.rdlabo.dev/projects/capacitor-admob/docs/configuration) for an example.
|
|
16
|
+
|
|
17
|
+
### iOS revenue values now use micros
|
|
18
|
+
|
|
19
|
+
The `valueMicros` field now correctly reports millionths of a currency unit for banners, interstitials, rewarded ads, rewarded interstitials, and app-open ads. For example, a value of `0.0012` currency units previously produced `0`; it now produces `1200`. Android values and event names are unchanged.
|
|
20
|
+
|
|
21
|
+
Divide `valueMicros` by `1_000_000` to obtain currency units on either platform. Review any iOS-specific workarounds in your analytics pipeline. Historical iOS values were truncated before conversion, so multiplying those stored values cannot recover the lost fractional revenue.
|
|
22
|
+
|
|
23
|
+
The version-by-version steps under “Breaking changes from earlier versions” apply to releases before v8.
|
|
24
|
+
|
|
25
|
+
## Google Mobile Ads SDK versions
|
|
26
|
+
|
|
27
|
+
This major version keeps Google Mobile Ads SDK APIs that are deprecated but still supported. Replacing them can change banner sizing and age-restricted treatment, so that work waits for the next major.
|
|
28
|
+
|
|
29
|
+
Google's [Next-Gen SDK for Android](https://developers.google.com/admob/android/next-gen) also waits for the next major: it changes SDK initialization, ad requests, and mediation.
|
|
30
|
+
|
|
31
|
+
Pinned versions: Android 25.4.x, iOS 13.6.0 (Swift Package Manager and CocoaPods). CocoaPods support is planned to be removed in the next major.
|
|
32
|
+
|
|
33
|
+
## Breaking changes from earlier versions
|
|
34
|
+
|
|
35
|
+
### 1.1.0
|
|
36
|
+
|
|
37
|
+
- Prepare for iOS 14+
|
|
38
|
+
- In file `ios/App/App/AppDelegate.swift` remove the following:
|
|
39
|
+
|
|
40
|
+
```diff
|
|
41
|
+
- import GoogleMobileAds
|
|
42
|
+
|
|
43
|
+
@UIApplicationMain
|
|
44
|
+
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
45
|
+
|
|
46
|
+
var window: UIWindow?
|
|
47
|
+
|
|
48
|
+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
|
49
|
+
- // Override point for customization after application launch.
|
|
50
|
+
- GADMobileAds.sharedInstance().start(completionHandler: nil)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 0.2.13
|
|
54
|
+
|
|
55
|
+
- isTest: 'LIVE' | 'TESTING' => boolean
|
|
56
|
+
|
|
57
|
+
### 0.2.12
|
|
58
|
+
|
|
59
|
+
**app.component.ts**
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
import { Plugins } from '@capacitor/core';
|
|
63
|
+
|
|
64
|
+
const { AdMob } = Plugins;
|
|
65
|
+
|
|
66
|
+
@Component({
|
|
67
|
+
selector: 'app-root',
|
|
68
|
+
templateUrl: 'app.component.html',
|
|
69
|
+
styleUrls: ['app.component.scss'],
|
|
70
|
+
})
|
|
71
|
+
export class AppComponent {
|
|
72
|
+
constructor() {
|
|
73
|
+
// Initialize AdMob for your Application
|
|
74
|
+
+AdMob.initialize('[APP_ID]');
|
|
75
|
+
-AdMob.initialize();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**admob.component.ts**
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
import { Plugins } from '@capacitor/core';
|
|
84
|
+
import { AdOptions, AdSize, AdPosition } from '@rdlabo/capacitor-admob';
|
|
85
|
+
|
|
86
|
+
const { AdMob } = Plugins;
|
|
87
|
+
|
|
88
|
+
@Component({
|
|
89
|
+
selector: 'admob',
|
|
90
|
+
templateUrl: 'admob.component.html',
|
|
91
|
+
styleUrls: ['admob.component.scss']
|
|
92
|
+
})
|
|
93
|
+
export class AdMobComponent {
|
|
94
|
+
|
|
95
|
+
const options: AdOptions = {
|
|
96
|
+
adId: 'YOUR ADID',
|
|
97
|
+
adSize: AdSize.BANNER,
|
|
98
|
+
position: AdPosition.BOTTOM_CENTER,
|
|
99
|
+
- margin: '0',
|
|
100
|
+
+ margin: 0,
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
constructor(){
|
|
104
|
+
// Show Banner Ad
|
|
105
|
+
AdMob.showBanner(this.options)
|
|
106
|
+
.then(
|
|
107
|
+
(value) => {
|
|
108
|
+
console.log(value); // true
|
|
109
|
+
},
|
|
110
|
+
(error) => {
|
|
111
|
+
console.error(error); // show error
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
// Subscibe Banner Event Listener
|
|
116
|
+
AdMob.addListener('onAdLoaded', (info: boolean) => {
|
|
117
|
+
console.log("Banner Ad Loaded");
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
+ // Get Banner Size
|
|
121
|
+
+ AdMob.addListener('onAdSize', (info: boolean) => {
|
|
122
|
+
+ console.log(info);
|
|
123
|
+
+ });
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|