@capacitor-community/admob 7.1.0-0 → 7.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.
Files changed (35) hide show
  1. package/CapacitorCommunityAdmob.podspec +1 -1
  2. package/Package.swift +4 -2
  3. package/README.md +415 -376
  4. package/android/build.gradle +15 -14
  5. package/android/src/main/java/com/getcapacitor/community/admob/AdMob.java +5 -0
  6. package/android/src/main/java/com/getcapacitor/community/admob/banner/BannerExecutor.java +17 -14
  7. package/android/src/main/java/com/getcapacitor/community/admob/consent/AdConsentExecutor.java +42 -24
  8. package/android/src/main/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutor.java +1 -1
  9. package/android/src/main/java/com/getcapacitor/community/admob/interstitial/InterstitialAdCallbackAndListeners.kt +2 -0
  10. package/android/src/main/java/com/getcapacitor/community/admob/rewarded/AdRewardExecutor.java +1 -1
  11. package/android/src/main/java/com/getcapacitor/community/admob/rewarded/RewardedAdCallbackAndListeners.kt +3 -0
  12. package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/AdRewardInterstitialExecutor.java +1 -1
  13. package/dist/docs.json +175 -10
  14. package/dist/esm/consent/consent-debug-geography.enum.d.ts +10 -1
  15. package/dist/esm/consent/consent-debug-geography.enum.js +9 -0
  16. package/dist/esm/consent/consent-debug-geography.enum.js.map +1 -1
  17. package/dist/esm/consent/consent-definition.interface.d.ts +7 -0
  18. package/dist/esm/consent/consent-info.interface.d.ts +11 -0
  19. package/dist/esm/consent/privacy-options-requirement-status.enum.d.ts +19 -0
  20. package/dist/esm/consent/privacy-options-requirement-status.enum.js +21 -0
  21. package/dist/esm/consent/privacy-options-requirement-status.enum.js.map +1 -0
  22. package/dist/esm/definitions.d.ts +0 -1
  23. package/dist/esm/definitions.js.map +1 -1
  24. package/dist/esm/shared/ad-options.interface.d.ts +11 -0
  25. package/dist/esm/web.d.ts +1 -0
  26. package/dist/esm/web.js +8 -0
  27. package/dist/esm/web.js.map +1 -1
  28. package/dist/plugin.cjs.js +37 -0
  29. package/dist/plugin.cjs.js.map +1 -1
  30. package/dist/plugin.js +37 -0
  31. package/dist/plugin.js.map +1 -1
  32. package/ios/Sources/AdMobPlugin/AdMobPlugin.swift +7 -0
  33. package/ios/Sources/AdMobPlugin/Banner/BannerExecutor.swift +8 -27
  34. package/ios/Sources/AdMobPlugin/Consent/ConsentExecutor.swift +39 -20
  35. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ /**
2
+ * For more information:
3
+ * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#privacyoptionsrequirementstatus
4
+ *
5
+ * */
6
+ export var PrivacyOptionsRequirementStatus;
7
+ (function (PrivacyOptionsRequirementStatus) {
8
+ /**
9
+ * Privacy options entry point is not required.
10
+ */
11
+ PrivacyOptionsRequirementStatus["NOT_REQUIRED"] = "NOT_REQUIRED";
12
+ /**
13
+ * Privacy options entry point is required.
14
+ */
15
+ PrivacyOptionsRequirementStatus["REQUIRED"] = "REQUIRED";
16
+ /**
17
+ * Privacy options requirement status is unknown.
18
+ */
19
+ PrivacyOptionsRequirementStatus["UNKNOWN"] = "UNKNOWN";
20
+ })(PrivacyOptionsRequirementStatus || (PrivacyOptionsRequirementStatus = {}));
21
+ //# sourceMappingURL=privacy-options-requirement-status.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"privacy-options-requirement-status.enum.js","sourceRoot":"","sources":["../../../src/consent/privacy-options-requirement-status.enum.ts"],"names":[],"mappings":"AAAA;;;;KAIK;AAEL,MAAM,CAAN,IAAY,+BAeX;AAfD,WAAY,+BAA+B;IACzC;;OAEG;IACH,gEAA6B,CAAA;IAE7B;;OAEG;IACH,wDAAqB,CAAA;IAErB;;OAEG;IACH,sDAAmB,CAAA;AACrB,CAAC,EAfW,+BAA+B,KAA/B,+BAA+B,QAe1C"}
@@ -23,7 +23,6 @@ export interface AdMobPlugin extends AdMobDefinitions {
23
23
  trackingAuthorizationStatus(): Promise<TrackingAuthorizationStatusInterface>;
24
24
  /**
25
25
  * request requestTrackingAuthorization (iOS >14).
26
- * This is deprecated method. We recommend UMP Consent.
27
26
  *
28
27
  * @see https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547038-trackingauthorizationstatus
29
28
  * @since 5.2.0
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAyGA,MAAM,CAAN,IAAY,kBAoBX;AApBD,WAAY,kBAAkB;IAC5B;;OAEG;IACH,yCAAmB,CAAA;IAEnB;;OAEG;IACH,2DAAqC,CAAA;IAErC;;OAEG;IACH,mCAAa,CAAA;IAEb;;OAEG;IACH,uDAAiC,CAAA;AACnC,CAAC,EApBW,kBAAkB,KAAlB,kBAAkB,QAoB7B"}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAwGA,MAAM,CAAN,IAAY,kBAoBX;AApBD,WAAY,kBAAkB;IAC5B;;OAEG;IACH,yCAAmB,CAAA;IAEnB;;OAEG;IACH,2DAAqC,CAAA;IAErC;;OAEG;IACH,mCAAa,CAAA;IAEb;;OAEG;IACH,uDAAiC,CAAA;AACnC,CAAC,EApBW,kBAAkB,KAAlB,kBAAkB,QAoB7B"}
@@ -32,4 +32,15 @@ export interface AdOptions {
32
32
  * @since 1.2.0
33
33
  */
34
34
  npa?: boolean;
35
+ /**
36
+ * Sets a flag that controls if this interstitial or reward object will be displayed in immersive mode.
37
+ * Call this method before show.
38
+ * During show, if this flag is on and immersive mode is supported,
39
+ * SYSTEM_UI_FLAG_IMMERSIVE_STICKY &SYSTEM_UI_FLAG_HIDE_NAVIGATION will be turned on for interstitial or reward ad.
40
+ *
41
+ * @see https://developers.google.com/admob/android/reference/com/google/android/gms/ads/interstitial/InterstitialAd#setImmersiveMode(boolean)
42
+ * @see https://developers.google.com/admob/android/reference/com/google/android/gms/ads/rewarded/RewardedAd#setImmersiveMode(boolean)
43
+ * @since 7.0.3
44
+ */
45
+ immersiveMode?: boolean;
35
46
  }
package/dist/esm/web.d.ts CHANGED
@@ -8,6 +8,7 @@ export declare class AdMobWeb extends WebPlugin implements AdMobPlugin {
8
8
  requestTrackingAuthorization(): Promise<void>;
9
9
  trackingAuthorizationStatus(): Promise<TrackingAuthorizationStatusInterface>;
10
10
  requestConsentInfo(options?: AdmobConsentRequestOptions): Promise<AdmobConsentInfo>;
11
+ showPrivacyOptionsForm(): Promise<void>;
11
12
  showConsentForm(): Promise<AdmobConsentInfo>;
12
13
  resetConsentInfo(): Promise<void>;
13
14
  setApplicationMuted(options: ApplicationMutedOptions): Promise<void>;
package/dist/esm/web.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
2
  import { AdmobConsentStatus } from './consent/consent-status.enum';
3
+ import { PrivacyOptionsRequirementStatus } from './consent/privacy-options-requirement-status.enum';
3
4
  export class AdMobWeb extends WebPlugin {
4
5
  async initialize() {
5
6
  console.log('initialize');
@@ -17,12 +18,19 @@ export class AdMobWeb extends WebPlugin {
17
18
  return {
18
19
  status: AdmobConsentStatus.REQUIRED,
19
20
  isConsentFormAvailable: true,
21
+ canRequestAds: true,
22
+ privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,
20
23
  };
21
24
  }
25
+ async showPrivacyOptionsForm() {
26
+ console.log('showPrivacyOptionsForm');
27
+ }
22
28
  async showConsentForm() {
23
29
  console.log('showConsentForm');
24
30
  return {
25
31
  status: AdmobConsentStatus.REQUIRED,
32
+ canRequestAds: true,
33
+ privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,
26
34
  };
27
35
  }
28
36
  async resetConsentInfo() {
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAS5C,OAAO,EAAE,kBAAkB,EAAE,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/**
244
244
  * Geography appears as not in EEA for debug devices.
245
+ * @deprecated
245
246
  */
246
247
  AdmobConsentDebugGeography[AdmobConsentDebugGeography["NOT_EEA"] = 2] = "NOT_EEA";
248
+ /**
249
+ * Geography appears as in regulated US state for debug devices.
250
+ */
251
+ AdmobConsentDebugGeography[AdmobConsentDebugGeography["US"] = 3] = "US";
252
+ /**
253
+ * Geography appears as OTHER state for debug devices.
254
+ */
255
+ AdmobConsentDebugGeography[AdmobConsentDebugGeography["OTHER"] = 4] = "OTHER";
247
256
  })(exports.AdmobConsentDebugGeography || (exports.AdmobConsentDebugGeography = {}));
248
257
 
249
258
  const AdMob = core.registerPlugin('AdMob', {
250
259
  web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.AdMobWeb()),
251
260
  });
252
261
 
262
+ /**
263
+ * For more information:
264
+ * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#privacyoptionsrequirementstatus
265
+ *
266
+ * */
267
+ var PrivacyOptionsRequirementStatus;
268
+ (function (PrivacyOptionsRequirementStatus) {
269
+ /**
270
+ * Privacy options entry point is not required.
271
+ */
272
+ PrivacyOptionsRequirementStatus["NOT_REQUIRED"] = "NOT_REQUIRED";
273
+ /**
274
+ * Privacy options entry point is required.
275
+ */
276
+ PrivacyOptionsRequirementStatus["REQUIRED"] = "REQUIRED";
277
+ /**
278
+ * Privacy options requirement status is unknown.
279
+ */
280
+ PrivacyOptionsRequirementStatus["UNKNOWN"] = "UNKNOWN";
281
+ })(PrivacyOptionsRequirementStatus || (PrivacyOptionsRequirementStatus = {}));
282
+
253
283
  class AdMobWeb extends core.WebPlugin {
254
284
  async initialize() {
255
285
  console.log('initialize');
@@ -267,12 +297,19 @@ class AdMobWeb extends core.WebPlugin {
267
297
  return {
268
298
  status: exports.AdmobConsentStatus.REQUIRED,
269
299
  isConsentFormAvailable: true,
300
+ canRequestAds: true,
301
+ privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,
270
302
  };
271
303
  }
304
+ async showPrivacyOptionsForm() {
305
+ console.log('showPrivacyOptionsForm');
306
+ }
272
307
  async showConsentForm() {
273
308
  console.log('showConsentForm');
274
309
  return {
275
310
  status: exports.AdmobConsentStatus.REQUIRED,
311
+ canRequestAds: true,
312
+ privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,
276
313
  };
277
314
  }
278
315
  async resetConsentInfo() {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.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/index.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 BannerAdPluginEvents[\"SizeChanged\"] = \"bannerAdSizeChanged\";\n BannerAdPluginEvents[\"Loaded\"] = \"bannerAdLoaded\";\n BannerAdPluginEvents[\"FailedToLoad\"] = \"bannerAdFailedToLoad\";\n /**\n * Open \"Adsense\" Event after user click banner\n */\n BannerAdPluginEvents[\"Opened\"] = \"bannerAdOpened\";\n /**\n * Close \"Adsense\" Event after user click banner\n */\n BannerAdPluginEvents[\"Closed\"] = \"bannerAdClosed\";\n /**\n * Similarly, this method should be called when an impression is recorded for the ad by the mediated SDK.\n */\n BannerAdPluginEvents[\"AdImpression\"] = \"bannerAdImpression\";\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 * Banner position be top-center\n */\n BannerAdPosition[\"TOP_CENTER\"] = \"TOP_CENTER\";\n /**\n * Banner position be center\n */\n BannerAdPosition[\"CENTER\"] = \"CENTER\";\n /**\n * Banner position be bottom-center(default)\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 * @deprecated\n * Will be removed in next AdMob versions use `ADAPTIVE_BANNER`\n * Screen width x 32|50|90\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 after trying to prepare and Interstitial, when it is loaded and ready to be show\n */\n InterstitialAdPluginEvents[\"Loaded\"] = \"interstitialAdLoaded\";\n /**\n * Emits after trying to prepare and Interstitial, when it could not be loaded\n */\n InterstitialAdPluginEvents[\"FailedToLoad\"] = \"interstitialAdFailedToLoad\";\n /**\n * Emits when the Interstitial ad is visible to the user\n */\n InterstitialAdPluginEvents[\"Showed\"] = \"interstitialAdShowed\";\n /**\n * Emits when the Interstitial ad is failed to show\n */\n InterstitialAdPluginEvents[\"FailedToShow\"] = \"interstitialAdFailedToShow\";\n /**\n * Emits when the Interstitial ad is not visible to the user anymore.\n */\n InterstitialAdPluginEvents[\"Dismissed\"] = \"interstitialAdDismissed\";\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 after trying to prepare a RewardAd and the Video is loaded and ready to be show\n */\n RewardInterstitialAdPluginEvents[\"Loaded\"] = \"onRewardedInterstitialAdLoaded\";\n /**\n * Emits after trying to prepare a RewardAd when it could not be loaded\n */\n RewardInterstitialAdPluginEvents[\"FailedToLoad\"] = \"onRewardedInterstitialAdFailedToLoad\";\n /**\n * Emits when the AdReward video is visible to the user\n */\n RewardInterstitialAdPluginEvents[\"Showed\"] = \"onRewardedInterstitialAdShowed\";\n /**\n * Emits when the AdReward video is failed to show\n */\n RewardInterstitialAdPluginEvents[\"FailedToShow\"] = \"onRewardedInterstitialAdFailedToShow\";\n /**\n * Emits when the AdReward video is not visible to the user anymore.\n *\n * **Important**: This has nothing to do with the reward it self. This event\n * will emits in this two cases:\n * 1. The user starts the video ad but close it before the reward emit.\n * 2. The user start the video and see it until end, then gets the reward\n * and after that the ad is closed.\n */\n RewardInterstitialAdPluginEvents[\"Dismissed\"] = \"onRewardedInterstitialAdDismissed\";\n /**\n * Emits when user get rewarded from AdReward\n */\n RewardInterstitialAdPluginEvents[\"Rewarded\"] = \"onRewardedInterstitialAdReward\";\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 after trying to prepare a RewardAd and the Video is loaded and ready to be show\n */\n RewardAdPluginEvents[\"Loaded\"] = \"onRewardedVideoAdLoaded\";\n /**\n * Emits after trying to prepare a RewardAd when it could not be loaded\n */\n RewardAdPluginEvents[\"FailedToLoad\"] = \"onRewardedVideoAdFailedToLoad\";\n /**\n * Emits when the AdReward video is visible to the user\n */\n RewardAdPluginEvents[\"Showed\"] = \"onRewardedVideoAdShowed\";\n /**\n * Emits when the AdReward video is failed to show\n */\n RewardAdPluginEvents[\"FailedToShow\"] = \"onRewardedVideoAdFailedToShow\";\n /**\n * Emits when the AdReward video is not visible to the user anymore.\n *\n * **Important**: This has nothing to do with the reward it self. This event\n * will emits in this two cases:\n * 1. The user starts the video ad but close it before the reward emit.\n * 2. The user start the video and see it until end, then gets the reward\n * and after that the ad is closed.\n */\n RewardAdPluginEvents[\"Dismissed\"] = \"onRewardedVideoAdDismissed\";\n /**\n * Emits when user get rewarded from AdReward\n */\n RewardAdPluginEvents[\"Rewarded\"] = \"onRewardedVideoAdReward\";\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 */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"NOT_EEA\"] = 2] = \"NOT_EEA\";\n})(AdmobConsentDebugGeography || (AdmobConsentDebugGeography = {}));\n//# sourceMappingURL=consent-debug-geography.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 { AdMob };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { AdmobConsentStatus } from './consent/consent-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 };\n }\n async showConsentForm() {\n console.log('showConsentForm');\n return {\n status: AdmobConsentStatus.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 // Hide the banner, remove it from screen, but can show it later\n async hideBanner() {\n console.log('hideBanner');\n }\n // Resume the banner, show it after hide\n async resumeBanner() {\n console.log('resumeBanner');\n }\n // Destroy the banner, remove it from screen.\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() {\n console.log('showInterstitial');\n }\n async prepareRewardVideoAd(options) {\n console.log(options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardVideoAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n async prepareRewardInterstitialAd(options) {\n console.log(options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardInterstitialAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardInterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,kBAAkB,EAAE;AAC/B;AACA;AACA;AACA,IAAI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,GAAG;AAC9B,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,EAAE;AACpB,YAAY,MAAM,EAAE,CAAC;AACrB,SAAS;AACT;AACA,IAAI,MAAM,2BAA2B,CAAC,OAAO,EAAE;AAC/C,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;AAC5B,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;AAClC,SAAS;AACT;AACA,IAAI,MAAM,wBAAwB,GAAG;AACrC,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,EAAE;AACpB,YAAY,MAAM,EAAE,CAAC;AACrB,SAAS;AACT;AACA;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.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/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 BannerAdPluginEvents[\"SizeChanged\"] = \"bannerAdSizeChanged\";\n BannerAdPluginEvents[\"Loaded\"] = \"bannerAdLoaded\";\n BannerAdPluginEvents[\"FailedToLoad\"] = \"bannerAdFailedToLoad\";\n /**\n * Open \"Adsense\" Event after user click banner\n */\n BannerAdPluginEvents[\"Opened\"] = \"bannerAdOpened\";\n /**\n * Close \"Adsense\" Event after user click banner\n */\n BannerAdPluginEvents[\"Closed\"] = \"bannerAdClosed\";\n /**\n * Similarly, this method should be called when an impression is recorded for the ad by the mediated SDK.\n */\n BannerAdPluginEvents[\"AdImpression\"] = \"bannerAdImpression\";\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 * Banner position be top-center\n */\n BannerAdPosition[\"TOP_CENTER\"] = \"TOP_CENTER\";\n /**\n * Banner position be center\n */\n BannerAdPosition[\"CENTER\"] = \"CENTER\";\n /**\n * Banner position be bottom-center(default)\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 * @deprecated\n * Will be removed in next AdMob versions use `ADAPTIVE_BANNER`\n * Screen width x 32|50|90\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 after trying to prepare and Interstitial, when it is loaded and ready to be show\n */\n InterstitialAdPluginEvents[\"Loaded\"] = \"interstitialAdLoaded\";\n /**\n * Emits after trying to prepare and Interstitial, when it could not be loaded\n */\n InterstitialAdPluginEvents[\"FailedToLoad\"] = \"interstitialAdFailedToLoad\";\n /**\n * Emits when the Interstitial ad is visible to the user\n */\n InterstitialAdPluginEvents[\"Showed\"] = \"interstitialAdShowed\";\n /**\n * Emits when the Interstitial ad is failed to show\n */\n InterstitialAdPluginEvents[\"FailedToShow\"] = \"interstitialAdFailedToShow\";\n /**\n * Emits when the Interstitial ad is not visible to the user anymore.\n */\n InterstitialAdPluginEvents[\"Dismissed\"] = \"interstitialAdDismissed\";\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 after trying to prepare a RewardAd and the Video is loaded and ready to be show\n */\n RewardInterstitialAdPluginEvents[\"Loaded\"] = \"onRewardedInterstitialAdLoaded\";\n /**\n * Emits after trying to prepare a RewardAd when it could not be loaded\n */\n RewardInterstitialAdPluginEvents[\"FailedToLoad\"] = \"onRewardedInterstitialAdFailedToLoad\";\n /**\n * Emits when the AdReward video is visible to the user\n */\n RewardInterstitialAdPluginEvents[\"Showed\"] = \"onRewardedInterstitialAdShowed\";\n /**\n * Emits when the AdReward video is failed to show\n */\n RewardInterstitialAdPluginEvents[\"FailedToShow\"] = \"onRewardedInterstitialAdFailedToShow\";\n /**\n * Emits when the AdReward video is not visible to the user anymore.\n *\n * **Important**: This has nothing to do with the reward it self. This event\n * will emits in this two cases:\n * 1. The user starts the video ad but close it before the reward emit.\n * 2. The user start the video and see it until end, then gets the reward\n * and after that the ad is closed.\n */\n RewardInterstitialAdPluginEvents[\"Dismissed\"] = \"onRewardedInterstitialAdDismissed\";\n /**\n * Emits when user get rewarded from AdReward\n */\n RewardInterstitialAdPluginEvents[\"Rewarded\"] = \"onRewardedInterstitialAdReward\";\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 after trying to prepare a RewardAd and the Video is loaded and ready to be show\n */\n RewardAdPluginEvents[\"Loaded\"] = \"onRewardedVideoAdLoaded\";\n /**\n * Emits after trying to prepare a RewardAd when it could not be loaded\n */\n RewardAdPluginEvents[\"FailedToLoad\"] = \"onRewardedVideoAdFailedToLoad\";\n /**\n * Emits when the AdReward video is visible to the user\n */\n RewardAdPluginEvents[\"Showed\"] = \"onRewardedVideoAdShowed\";\n /**\n * Emits when the AdReward video is failed to show\n */\n RewardAdPluginEvents[\"FailedToShow\"] = \"onRewardedVideoAdFailedToShow\";\n /**\n * Emits when the AdReward video is not visible to the user anymore.\n *\n * **Important**: This has nothing to do with the reward it self. This event\n * will emits in this two cases:\n * 1. The user starts the video ad but close it before the reward emit.\n * 2. The user start the video and see it until end, then gets the reward\n * and after that the ad is closed.\n */\n RewardAdPluginEvents[\"Dismissed\"] = \"onRewardedVideoAdDismissed\";\n /**\n * Emits when user get rewarded from AdReward\n */\n RewardAdPluginEvents[\"Rewarded\"] = \"onRewardedVideoAdReward\";\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","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 { 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 // Hide the banner, remove it from screen, but can show it later\n async hideBanner() {\n console.log('hideBanner');\n }\n // Resume the banner, show it after hide\n async resumeBanner() {\n console.log('resumeBanner');\n }\n // Destroy the banner, remove it from screen.\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() {\n console.log('showInterstitial');\n }\n async prepareRewardVideoAd(options) {\n console.log(options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardVideoAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n async prepareRewardInterstitialAd(options) {\n console.log(options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardInterstitialAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardInterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,kBAAkB,EAAE;AAC/B;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS;AAC7C;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;AAC/D;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,MAAM,CAAC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AM,YAAY,GAAG;AACzB,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;AACnC;AACA;AACA,IAAI,MAAM,YAAY,GAAG;AACzB,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;AACnC;AACA,IAAI,MAAM,mBAAmB,CAAC,OAAO,EAAE;AACvC,QAAQ,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC;AACnD,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;AAClC,SAAS;AACT;AACA,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;AACvC;AACA,IAAI,MAAM,oBAAoB,CAAC,OAAO,EAAE;AACxC,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;AAC5B,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;AAClC,SAAS;AACT;AACA,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,EAAE;AACpB,YAAY,MAAM,EAAE,CAAC;AACrB,SAAS;AACT;AACA,IAAI,MAAM,2BAA2B,CAAC,OAAO,EAAE;AAC/C,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;AAC5B,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;AAClC,SAAS;AACT;AACA,IAAI,MAAM,wBAAwB,GAAG;AACrC,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,EAAE;AACpB,YAAY,MAAM,EAAE,CAAC;AACrB,SAAS;AACT;AACA;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -241,14 +241,44 @@ var capacitorStripe = (function (exports, core) {
241
241
  AdmobConsentDebugGeography[AdmobConsentDebugGeography["EEA"] = 1] = "EEA";
242
242
  /**
243
243
  * Geography appears as not in EEA for debug devices.
244
+ * @deprecated
244
245
  */
245
246
  AdmobConsentDebugGeography[AdmobConsentDebugGeography["NOT_EEA"] = 2] = "NOT_EEA";
247
+ /**
248
+ * Geography appears as in regulated US state for debug devices.
249
+ */
250
+ AdmobConsentDebugGeography[AdmobConsentDebugGeography["US"] = 3] = "US";
251
+ /**
252
+ * Geography appears as OTHER state for debug devices.
253
+ */
254
+ AdmobConsentDebugGeography[AdmobConsentDebugGeography["OTHER"] = 4] = "OTHER";
246
255
  })(exports.AdmobConsentDebugGeography || (exports.AdmobConsentDebugGeography = {}));
247
256
 
248
257
  const AdMob = core.registerPlugin('AdMob', {
249
258
  web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.AdMobWeb()),
250
259
  });
251
260
 
261
+ /**
262
+ * For more information:
263
+ * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#privacyoptionsrequirementstatus
264
+ *
265
+ * */
266
+ var PrivacyOptionsRequirementStatus;
267
+ (function (PrivacyOptionsRequirementStatus) {
268
+ /**
269
+ * Privacy options entry point is not required.
270
+ */
271
+ PrivacyOptionsRequirementStatus["NOT_REQUIRED"] = "NOT_REQUIRED";
272
+ /**
273
+ * Privacy options entry point is required.
274
+ */
275
+ PrivacyOptionsRequirementStatus["REQUIRED"] = "REQUIRED";
276
+ /**
277
+ * Privacy options requirement status is unknown.
278
+ */
279
+ PrivacyOptionsRequirementStatus["UNKNOWN"] = "UNKNOWN";
280
+ })(PrivacyOptionsRequirementStatus || (PrivacyOptionsRequirementStatus = {}));
281
+
252
282
  class AdMobWeb extends core.WebPlugin {
253
283
  async initialize() {
254
284
  console.log('initialize');
@@ -266,12 +296,19 @@ var capacitorStripe = (function (exports, core) {
266
296
  return {
267
297
  status: exports.AdmobConsentStatus.REQUIRED,
268
298
  isConsentFormAvailable: true,
299
+ canRequestAds: true,
300
+ privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,
269
301
  };
270
302
  }
303
+ async showPrivacyOptionsForm() {
304
+ console.log('showPrivacyOptionsForm');
305
+ }
271
306
  async showConsentForm() {
272
307
  console.log('showConsentForm');
273
308
  return {
274
309
  status: exports.AdmobConsentStatus.REQUIRED,
310
+ canRequestAds: true,
311
+ privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,
275
312
  };
276
313
  }
277
314
  async resetConsentInfo() {
@@ -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/index.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 BannerAdPluginEvents[\"SizeChanged\"] = \"bannerAdSizeChanged\";\n BannerAdPluginEvents[\"Loaded\"] = \"bannerAdLoaded\";\n BannerAdPluginEvents[\"FailedToLoad\"] = \"bannerAdFailedToLoad\";\n /**\n * Open \"Adsense\" Event after user click banner\n */\n BannerAdPluginEvents[\"Opened\"] = \"bannerAdOpened\";\n /**\n * Close \"Adsense\" Event after user click banner\n */\n BannerAdPluginEvents[\"Closed\"] = \"bannerAdClosed\";\n /**\n * Similarly, this method should be called when an impression is recorded for the ad by the mediated SDK.\n */\n BannerAdPluginEvents[\"AdImpression\"] = \"bannerAdImpression\";\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 * Banner position be top-center\n */\n BannerAdPosition[\"TOP_CENTER\"] = \"TOP_CENTER\";\n /**\n * Banner position be center\n */\n BannerAdPosition[\"CENTER\"] = \"CENTER\";\n /**\n * Banner position be bottom-center(default)\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 * @deprecated\n * Will be removed in next AdMob versions use `ADAPTIVE_BANNER`\n * Screen width x 32|50|90\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 after trying to prepare and Interstitial, when it is loaded and ready to be show\n */\n InterstitialAdPluginEvents[\"Loaded\"] = \"interstitialAdLoaded\";\n /**\n * Emits after trying to prepare and Interstitial, when it could not be loaded\n */\n InterstitialAdPluginEvents[\"FailedToLoad\"] = \"interstitialAdFailedToLoad\";\n /**\n * Emits when the Interstitial ad is visible to the user\n */\n InterstitialAdPluginEvents[\"Showed\"] = \"interstitialAdShowed\";\n /**\n * Emits when the Interstitial ad is failed to show\n */\n InterstitialAdPluginEvents[\"FailedToShow\"] = \"interstitialAdFailedToShow\";\n /**\n * Emits when the Interstitial ad is not visible to the user anymore.\n */\n InterstitialAdPluginEvents[\"Dismissed\"] = \"interstitialAdDismissed\";\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 after trying to prepare a RewardAd and the Video is loaded and ready to be show\n */\n RewardInterstitialAdPluginEvents[\"Loaded\"] = \"onRewardedInterstitialAdLoaded\";\n /**\n * Emits after trying to prepare a RewardAd when it could not be loaded\n */\n RewardInterstitialAdPluginEvents[\"FailedToLoad\"] = \"onRewardedInterstitialAdFailedToLoad\";\n /**\n * Emits when the AdReward video is visible to the user\n */\n RewardInterstitialAdPluginEvents[\"Showed\"] = \"onRewardedInterstitialAdShowed\";\n /**\n * Emits when the AdReward video is failed to show\n */\n RewardInterstitialAdPluginEvents[\"FailedToShow\"] = \"onRewardedInterstitialAdFailedToShow\";\n /**\n * Emits when the AdReward video is not visible to the user anymore.\n *\n * **Important**: This has nothing to do with the reward it self. This event\n * will emits in this two cases:\n * 1. The user starts the video ad but close it before the reward emit.\n * 2. The user start the video and see it until end, then gets the reward\n * and after that the ad is closed.\n */\n RewardInterstitialAdPluginEvents[\"Dismissed\"] = \"onRewardedInterstitialAdDismissed\";\n /**\n * Emits when user get rewarded from AdReward\n */\n RewardInterstitialAdPluginEvents[\"Rewarded\"] = \"onRewardedInterstitialAdReward\";\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 after trying to prepare a RewardAd and the Video is loaded and ready to be show\n */\n RewardAdPluginEvents[\"Loaded\"] = \"onRewardedVideoAdLoaded\";\n /**\n * Emits after trying to prepare a RewardAd when it could not be loaded\n */\n RewardAdPluginEvents[\"FailedToLoad\"] = \"onRewardedVideoAdFailedToLoad\";\n /**\n * Emits when the AdReward video is visible to the user\n */\n RewardAdPluginEvents[\"Showed\"] = \"onRewardedVideoAdShowed\";\n /**\n * Emits when the AdReward video is failed to show\n */\n RewardAdPluginEvents[\"FailedToShow\"] = \"onRewardedVideoAdFailedToShow\";\n /**\n * Emits when the AdReward video is not visible to the user anymore.\n *\n * **Important**: This has nothing to do with the reward it self. This event\n * will emits in this two cases:\n * 1. The user starts the video ad but close it before the reward emit.\n * 2. The user start the video and see it until end, then gets the reward\n * and after that the ad is closed.\n */\n RewardAdPluginEvents[\"Dismissed\"] = \"onRewardedVideoAdDismissed\";\n /**\n * Emits when user get rewarded from AdReward\n */\n RewardAdPluginEvents[\"Rewarded\"] = \"onRewardedVideoAdReward\";\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 */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"NOT_EEA\"] = 2] = \"NOT_EEA\";\n})(AdmobConsentDebugGeography || (AdmobConsentDebugGeography = {}));\n//# sourceMappingURL=consent-debug-geography.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 { AdMob };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { AdmobConsentStatus } from './consent/consent-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 };\n }\n async showConsentForm() {\n console.log('showConsentForm');\n return {\n status: AdmobConsentStatus.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 // Hide the banner, remove it from screen, but can show it later\n async hideBanner() {\n console.log('hideBanner');\n }\n // Resume the banner, show it after hide\n async resumeBanner() {\n console.log('resumeBanner');\n }\n // Destroy the banner, remove it from screen.\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() {\n console.log('showInterstitial');\n }\n async prepareRewardVideoAd(options) {\n console.log(options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardVideoAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n async prepareRewardInterstitialAd(options) {\n console.log(options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardInterstitialAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardInterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","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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B,YAAY,MAAM,EAAE,CAAC;IACrB,SAAS;IACT;IACA,IAAI,MAAM,2BAA2B,CAAC,OAAO,EAAE;IAC/C,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;IAC5B,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS;IACT;IACA,IAAI,MAAM,wBAAwB,GAAG;IACrC,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,EAAE;IACpB,YAAY,MAAM,EAAE,CAAC;IACrB,SAAS;IACT;IACA;;;;;;;;;;;;;;;"}
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/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 BannerAdPluginEvents[\"SizeChanged\"] = \"bannerAdSizeChanged\";\n BannerAdPluginEvents[\"Loaded\"] = \"bannerAdLoaded\";\n BannerAdPluginEvents[\"FailedToLoad\"] = \"bannerAdFailedToLoad\";\n /**\n * Open \"Adsense\" Event after user click banner\n */\n BannerAdPluginEvents[\"Opened\"] = \"bannerAdOpened\";\n /**\n * Close \"Adsense\" Event after user click banner\n */\n BannerAdPluginEvents[\"Closed\"] = \"bannerAdClosed\";\n /**\n * Similarly, this method should be called when an impression is recorded for the ad by the mediated SDK.\n */\n BannerAdPluginEvents[\"AdImpression\"] = \"bannerAdImpression\";\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 * Banner position be top-center\n */\n BannerAdPosition[\"TOP_CENTER\"] = \"TOP_CENTER\";\n /**\n * Banner position be center\n */\n BannerAdPosition[\"CENTER\"] = \"CENTER\";\n /**\n * Banner position be bottom-center(default)\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 * @deprecated\n * Will be removed in next AdMob versions use `ADAPTIVE_BANNER`\n * Screen width x 32|50|90\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 after trying to prepare and Interstitial, when it is loaded and ready to be show\n */\n InterstitialAdPluginEvents[\"Loaded\"] = \"interstitialAdLoaded\";\n /**\n * Emits after trying to prepare and Interstitial, when it could not be loaded\n */\n InterstitialAdPluginEvents[\"FailedToLoad\"] = \"interstitialAdFailedToLoad\";\n /**\n * Emits when the Interstitial ad is visible to the user\n */\n InterstitialAdPluginEvents[\"Showed\"] = \"interstitialAdShowed\";\n /**\n * Emits when the Interstitial ad is failed to show\n */\n InterstitialAdPluginEvents[\"FailedToShow\"] = \"interstitialAdFailedToShow\";\n /**\n * Emits when the Interstitial ad is not visible to the user anymore.\n */\n InterstitialAdPluginEvents[\"Dismissed\"] = \"interstitialAdDismissed\";\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 after trying to prepare a RewardAd and the Video is loaded and ready to be show\n */\n RewardInterstitialAdPluginEvents[\"Loaded\"] = \"onRewardedInterstitialAdLoaded\";\n /**\n * Emits after trying to prepare a RewardAd when it could not be loaded\n */\n RewardInterstitialAdPluginEvents[\"FailedToLoad\"] = \"onRewardedInterstitialAdFailedToLoad\";\n /**\n * Emits when the AdReward video is visible to the user\n */\n RewardInterstitialAdPluginEvents[\"Showed\"] = \"onRewardedInterstitialAdShowed\";\n /**\n * Emits when the AdReward video is failed to show\n */\n RewardInterstitialAdPluginEvents[\"FailedToShow\"] = \"onRewardedInterstitialAdFailedToShow\";\n /**\n * Emits when the AdReward video is not visible to the user anymore.\n *\n * **Important**: This has nothing to do with the reward it self. This event\n * will emits in this two cases:\n * 1. The user starts the video ad but close it before the reward emit.\n * 2. The user start the video and see it until end, then gets the reward\n * and after that the ad is closed.\n */\n RewardInterstitialAdPluginEvents[\"Dismissed\"] = \"onRewardedInterstitialAdDismissed\";\n /**\n * Emits when user get rewarded from AdReward\n */\n RewardInterstitialAdPluginEvents[\"Rewarded\"] = \"onRewardedInterstitialAdReward\";\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 after trying to prepare a RewardAd and the Video is loaded and ready to be show\n */\n RewardAdPluginEvents[\"Loaded\"] = \"onRewardedVideoAdLoaded\";\n /**\n * Emits after trying to prepare a RewardAd when it could not be loaded\n */\n RewardAdPluginEvents[\"FailedToLoad\"] = \"onRewardedVideoAdFailedToLoad\";\n /**\n * Emits when the AdReward video is visible to the user\n */\n RewardAdPluginEvents[\"Showed\"] = \"onRewardedVideoAdShowed\";\n /**\n * Emits when the AdReward video is failed to show\n */\n RewardAdPluginEvents[\"FailedToShow\"] = \"onRewardedVideoAdFailedToShow\";\n /**\n * Emits when the AdReward video is not visible to the user anymore.\n *\n * **Important**: This has nothing to do with the reward it self. This event\n * will emits in this two cases:\n * 1. The user starts the video ad but close it before the reward emit.\n * 2. The user start the video and see it until end, then gets the reward\n * and after that the ad is closed.\n */\n RewardAdPluginEvents[\"Dismissed\"] = \"onRewardedVideoAdDismissed\";\n /**\n * Emits when user get rewarded from AdReward\n */\n RewardAdPluginEvents[\"Rewarded\"] = \"onRewardedVideoAdReward\";\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","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 { 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 // Hide the banner, remove it from screen, but can show it later\n async hideBanner() {\n console.log('hideBanner');\n }\n // Resume the banner, show it after hide\n async resumeBanner() {\n console.log('resumeBanner');\n }\n // Destroy the banner, remove it from screen.\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() {\n console.log('showInterstitial');\n }\n async prepareRewardVideoAd(options) {\n console.log(options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardVideoAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n async prepareRewardInterstitialAd(options) {\n console.log(options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardInterstitialAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardInterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","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,gBAA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CAAC;IACnC;IACA;IACA,IAAI,MAAM,YAAY,GAAG;IACzB,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IACnC;IACA,IAAI,MAAM,mBAAmB,CAAC,OAAO,EAAE;IACvC,QAAQ,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC;IACnD,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS;IACT;IACA,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;IACvC;IACA,IAAI,MAAM,oBAAoB,CAAC,OAAO,EAAE;IACxC,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;IAC5B,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS;IACT;IACA,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,EAAE;IACpB,YAAY,MAAM,EAAE,CAAC;IACrB,SAAS;IACT;IACA,IAAI,MAAM,2BAA2B,CAAC,OAAO,EAAE;IAC/C,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;IAC5B,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS;IACT;IACA,IAAI,MAAM,wBAAwB,GAAG;IACrC,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,EAAE;IACpB,YAAY,MAAM,EAAE,CAAC;IACrB,SAAS;IACT;IACA;;;;;;;;;;;;;;;"}
@@ -13,6 +13,7 @@ public class AdMobPlugin: CAPPlugin, CAPBridgedPlugin {
13
13
  CAPPluginMethod(name: "initialize", returnType: CAPPluginReturnPromise),
14
14
  CAPPluginMethod(name: "trackingAuthorizationStatus", returnType: CAPPluginReturnPromise),
15
15
  CAPPluginMethod(name: "requestConsentInfo", returnType: CAPPluginReturnPromise),
16
+ CAPPluginMethod(name: "showPrivacyOptionsForm", returnType: CAPPluginReturnPromise),
16
17
  CAPPluginMethod(name: "requestTrackingAuthorization", returnType: CAPPluginReturnPromise),
17
18
  CAPPluginMethod(name: "showConsentForm", returnType: CAPPluginReturnPromise),
18
19
  CAPPluginMethod(name: "resetConsentInfo", returnType: CAPPluginReturnPromise),
@@ -239,6 +240,12 @@ public class AdMobPlugin: CAPPlugin, CAPBridgedPlugin {
239
240
  }
240
241
  }
241
242
 
243
+ @objc func showPrivacyOptionsForm(_ call: CAPPluginCall) {
244
+ DispatchQueue.main.async {
245
+ self.consentExecutor.showPrivacyOptionsForm(call)
246
+ }
247
+ }
248
+
242
249
  @objc func resetConsentInfo(_ call: CAPPluginCall) {
243
250
  DispatchQueue.main.async {
244
251
  self.consentExecutor.resetConsentInfo(call)
@@ -40,11 +40,7 @@ class BannerExecutor: NSObject, BannerViewDelegate {
40
40
  let frame = { () -> CGRect in
41
41
  // Here safe area is taken into account, hence the view frame is used
42
42
  // after the view has been laid out.
43
- if #available(iOS 11.0, *) {
44
- return rootViewController.view.frame.inset(by: rootViewController.view.safeAreaInsets)
45
- } else {
46
- return rootViewController.view.frame
47
- }
43
+ return rootViewController.view.frame.inset(by: rootViewController.view.safeAreaInsets)
48
44
  }()
49
45
  let viewWidth = frame.size.width
50
46
  bannerSize = currentOrientationAnchoredAdaptiveBanner(width: viewWidth)
@@ -128,7 +124,7 @@ class BannerExecutor: NSObject, BannerViewDelegate {
128
124
  }
129
125
 
130
126
  /// Tells the delegate an ad request loaded an ad.
131
- func bannerViewDidReceiveAd(_ bannerView: GADBannerView) {
127
+ func bannerViewDidReceiveAd(_ bannerView: BannerView) {
132
128
  NSLog("bannerViewDidReceiveAd")
133
129
  if let rootViewController = plugin?.getRootVC() {
134
130
  rootViewController.view.addSubview(bannerView)
@@ -140,7 +136,7 @@ class BannerExecutor: NSObject, BannerViewDelegate {
140
136
  attribute: self.adPosition == "TOP_CENTER" ? .top : .bottom,
141
137
  multiplier: 1,
142
138
  constant: CGFloat(Int(self.Margin) * -1)),
143
- NSLayoutConstraint(item: bannerView,
139
+ NSLayoutConstraint(item: bannerView,
144
140
  attribute: .centerX,
145
141
  relatedBy: .equal,
146
142
  toItem: rootViewController.view,
@@ -148,30 +144,15 @@ class BannerExecutor: NSObject, BannerViewDelegate {
148
144
  multiplier: 1,
149
145
  constant: 0)
150
146
  ])
151
- }
152
- }
147
+ self.plugin?.notifyListeners(BannerAdPluginEvents.SizeChanged.rawValue, data: [
148
+ "width": bannerView.frame.width,
149
+ "height": bannerView.frame.height
150
+ ])
151
+ self.plugin?.notifyListeners(BannerAdPluginEvents.Loaded.rawValue, data: [:])
153
152
 
154
- private func removeBannerViewToView() {
155
- if let rootViewController = plugin?.getRootVC() {
156
- if let subView = rootViewController.view.viewWithTag(2743243288699) {
157
- bannerView.delegate = nil
158
- NSLog("AdMob: find subView")
159
- subView.removeFromSuperview()
160
- }
161
153
  }
162
154
  }
163
155
 
164
- /// Tells the delegate an ad request loaded an ad.
165
- func bannerViewDidReceiveAd(_ bannerView: BannerView) {
166
- NSLog("bannerViewDidReceiveAd")
167
-
168
- self.plugin?.notifyListeners(BannerAdPluginEvents.SizeChanged.rawValue, data: [
169
- "width": bannerView.frame.width,
170
- "height": bannerView.frame.height
171
- ])
172
- self.plugin?.notifyListeners(BannerAdPluginEvents.Loaded.rawValue, data: [:])
173
- }
174
-
175
156
  /// Tells the delegate an ad request failed.
176
157
  func bannerView(_ bannerView: BannerView,
177
158
  didFailToReceiveAdWithError error: Error) {
@@ -25,40 +25,48 @@ class ConsentExecutor: NSObject {
25
25
  } else {
26
26
  call.resolve([
27
27
  "status": self.getConsentStatusString(ConsentInformation.shared.consentStatus),
28
- "isConsentFormAvailable": ConsentInformation.shared.formStatus == FormStatus.available
28
+ "isConsentFormAvailable": ConsentInformation.shared.formStatus == FormStatus.available,
29
+ "canRequestAds": ConsentInformation.shared.canRequestAds,
30
+ "privacyOptionsRequirementStatus": self.getPrivacyOptionsRequirementStatus(ConsentInformation.shared.privacyOptionsRequirementStatus)
29
31
  ])
30
32
  }
31
33
  })
32
34
  }
33
35
 
36
+ @MainActor
37
+ func showPrivacyOptionsForm(_ call: CAPPluginCall) {
38
+ guard let rootViewController = plugin?.getRootVC() else {
39
+ return call.reject("No ViewController")
40
+ }
41
+
42
+ Task {
43
+ do {
44
+ try await ConsentForm.presentPrivacyOptionsForm(from: rootViewController)
45
+ call.resolve()
46
+ } catch {
47
+ call.reject("Failed to show privacy options form: \(error.localizedDescription)")
48
+ }
49
+ }
50
+ }
51
+
34
52
  func showConsentForm(_ call: CAPPluginCall) {
35
53
  if let rootViewController = plugin?.getRootVC() {
36
54
  let formStatus = ConsentInformation.shared.formStatus
37
55
 
38
56
  if formStatus == FormStatus.available {
39
- ConsentForm.load(with: {form, loadError in
40
- if loadError != nil {
41
- call.reject(loadError?.localizedDescription ?? "Load consent form error")
42
- return
43
- }
44
-
45
- if ConsentInformation.shared.consentStatus == ConsentStatus.required {
46
- form?.present(from: rootViewController, completionHandler: { dismissError in
47
- if dismissError != nil {
48
- call.reject(dismissError?.localizedDescription ?? "Consent dismiss error")
49
- return
50
- }
57
+ Task { @MainActor in
58
+ do {
59
+ try await ConsentForm.loadAndPresentIfRequired(from: rootViewController)
51
60
 
52
- call.resolve([
53
- "status": self.getConsentStatusString(ConsentInformation.shared.consentStatus)
54
- ])
55
- })
56
- } else {
57
61
  call.resolve([
58
- "status": self.getConsentStatusString(ConsentInformation.shared.consentStatus)
62
+ "status": self.getConsentStatusString(ConsentInformation.shared.consentStatus),
63
+ "canRequestAds": ConsentInformation.shared.canRequestAds,
64
+ "privacyOptionsRequirementStatus": self.getPrivacyOptionsRequirementStatus(ConsentInformation.shared.privacyOptionsRequirementStatus)
59
65
  ])
66
+ } catch {
67
+ call.reject("Request consent info failed")
60
68
  }
61
- })
69
+ }
62
70
  } else {
63
71
  call.reject("Consent Form not available")
64
72
  }
@@ -84,4 +92,15 @@ class ConsentExecutor: NSObject {
84
92
  return "UNKNOWN"
85
93
  }
86
94
  }
95
+
96
+ func getPrivacyOptionsRequirementStatus(_ requirementStatus: PrivacyOptionsRequirementStatus) -> String {
97
+ switch requirementStatus {
98
+ case PrivacyOptionsRequirementStatus.required:
99
+ return "REQUIRED"
100
+ case PrivacyOptionsRequirementStatus.notRequired:
101
+ return "NOT_REQUIRED"
102
+ default:
103
+ return "UNKNOWN"
104
+ }
105
+ }
87
106
  }