@capacitor-community/admob 5.3.1 → 6.0.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.
@@ -15,5 +15,5 @@ Pod::Spec.new do |s|
15
15
  s.swift_version = '5.1'
16
16
  s.static_framework = true
17
17
  s.dependency 'Capacitor'
18
- s.dependency 'Google-Mobile-Ads-SDK', '10.12.0'
18
+ s.dependency 'Google-Mobile-Ads-SDK', '11.3.0'
19
19
  end
package/README.md CHANGED
@@ -118,25 +118,35 @@ Don't forget to replace `[APP_ID]` by your AdMob application Id.
118
118
  import { AdMob } from '@capacitor-community/admob';
119
119
 
120
120
  export async function initialize(): Promise<void> {
121
- const [consentInfo, trackingInfo] = await Promise.all([AdMob.requestConsentInfo(), AdMob.trackingAuthorizationStatus()]);
122
-
123
- if (consentInfo.status === AdmobConsentStatus.REQUIRED && trackingInfo.status === 'notDetermined') {
124
- /**
125
- * If you want to explain TrackingAuthorization before showing the iOS dialog,
126
- * you can show the modal here.
127
- * ex)
128
- * const modal = await this.modalCtrl.create({
129
- * component: RequestTrackingPage,
130
- * });
131
- * await modal.present();
132
- * await modal.onDidDismiss(); // Wait for close modal
133
- **/
134
-
135
- if (consentInfo.isConsentFormAvailable) {
136
- await AdMob.showConsentForm();
137
- } else {
138
- await AdMob.requestTrackingAuthorization();
139
- }
121
+ await AdMob.initialize();
122
+
123
+ const [trackingInfo, consentInfo] = await Promise.all([
124
+ AdMob.trackingAuthorizationStatus(),
125
+ AdMob.requestConsentInfo(),
126
+ ]);
127
+
128
+ if (trackingInfo.status === 'notDetermined') {
129
+ /**
130
+ * If you want to explain TrackingAuthorization before showing the iOS dialog,
131
+ * you can show the modal here.
132
+ * ex)
133
+ * const modal = await this.modalCtrl.create({
134
+ * component: RequestTrackingPage,
135
+ * });
136
+ * await modal.present();
137
+ * await modal.onDidDismiss(); // Wait for close modal
138
+ **/
139
+
140
+ await AdMob.requestTrackingAuthorization();
141
+ }
142
+
143
+ const authorizationStatus = await AdMob.trackingAuthorizationStatus();
144
+ if (
145
+ authorizationStatus.status === 'authorized' &&
146
+ consentInfo.isConsentFormAvailable &&
147
+ consentInfo.status === AdmobConsentStatus.REQUIRED
148
+ ) {
149
+ await AdMob.showConsentForm();
140
150
  }
141
151
  }
142
152
  ```
@@ -459,7 +469,7 @@ Destroy the banner, remove it from screen.
459
469
  ### addListener(BannerAdPluginEvents.SizeChanged, ...)
460
470
 
461
471
  ```typescript
462
- addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void) => PluginListenerHandle
472
+ addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void) => Promise<PluginListenerHandle>
463
473
  ```
464
474
 
465
475
  | Param | Type | Description |
@@ -467,7 +477,7 @@ addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: Ad
467
477
  | **`eventName`** | <code><a href="#banneradpluginevents">BannerAdPluginEvents.SizeChanged</a></code> | bannerAdSizeChanged |
468
478
  | **`listenerFunc`** | <code>(info: <a href="#admobbannersize">AdMobBannerSize</a>) =&gt; void</code> | |
469
479
 
470
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
480
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
471
481
 
472
482
  --------------------
473
483
 
@@ -475,7 +485,7 @@ addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: Ad
475
485
  ### addListener(BannerAdPluginEvents.Loaded, ...)
476
486
 
477
487
  ```typescript
478
- addListener(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void) => PluginListenerHandle
488
+ addListener(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void) => Promise<PluginListenerHandle>
479
489
  ```
480
490
 
481
491
  Notice: request loaded Banner ad
@@ -485,7 +495,7 @@ Notice: request loaded Banner ad
485
495
  | **`eventName`** | <code><a href="#banneradpluginevents">BannerAdPluginEvents.Loaded</a></code> | bannerAdLoaded |
486
496
  | **`listenerFunc`** | <code>() =&gt; void</code> | |
487
497
 
488
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
498
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
489
499
 
490
500
  --------------------
491
501
 
@@ -493,7 +503,7 @@ Notice: request loaded Banner ad
493
503
  ### addListener(BannerAdPluginEvents.FailedToLoad, ...)
494
504
 
495
505
  ```typescript
496
- addListener(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void) => PluginListenerHandle
506
+ addListener(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void) => Promise<PluginListenerHandle>
497
507
  ```
498
508
 
499
509
  Notice: request failed Banner ad
@@ -503,7 +513,7 @@ Notice: request failed Banner ad
503
513
  | **`eventName`** | <code><a href="#banneradpluginevents">BannerAdPluginEvents.FailedToLoad</a></code> | bannerAdFailedToLoad |
504
514
  | **`listenerFunc`** | <code>(info: <a href="#admoberror">AdMobError</a>) =&gt; void</code> | |
505
515
 
506
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
516
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
507
517
 
508
518
  --------------------
509
519
 
@@ -511,7 +521,7 @@ Notice: request failed Banner ad
511
521
  ### addListener(BannerAdPluginEvents.Opened, ...)
512
522
 
513
523
  ```typescript
514
- addListener(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void) => PluginListenerHandle
524
+ addListener(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void) => Promise<PluginListenerHandle>
515
525
  ```
516
526
 
517
527
  Notice: full-screen banner view will be presented in response to the user clicking on an ad.
@@ -521,7 +531,7 @@ Notice: full-screen banner view will be presented in response to the user clicki
521
531
  | **`eventName`** | <code><a href="#banneradpluginevents">BannerAdPluginEvents.Opened</a></code> | bannerAdOpened |
522
532
  | **`listenerFunc`** | <code>() =&gt; void</code> | |
523
533
 
524
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
534
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
525
535
 
526
536
  --------------------
527
537
 
@@ -529,7 +539,7 @@ Notice: full-screen banner view will be presented in response to the user clicki
529
539
  ### addListener(BannerAdPluginEvents.Closed, ...)
530
540
 
531
541
  ```typescript
532
- addListener(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void) => PluginListenerHandle
542
+ addListener(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void) => Promise<PluginListenerHandle>
533
543
  ```
534
544
 
535
545
  Notice: The full-screen banner view will been dismissed.
@@ -539,7 +549,7 @@ Notice: The full-screen banner view will been dismissed.
539
549
  | **`eventName`** | <code><a href="#banneradpluginevents">BannerAdPluginEvents.Closed</a></code> | bannerAdClosed |
540
550
  | **`listenerFunc`** | <code>() =&gt; void</code> | |
541
551
 
542
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
552
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
543
553
 
544
554
  --------------------
545
555
 
@@ -547,7 +557,7 @@ Notice: The full-screen banner view will been dismissed.
547
557
  ### addListener(BannerAdPluginEvents.AdImpression, ...)
548
558
 
549
559
  ```typescript
550
- addListener(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void) => PluginListenerHandle
560
+ addListener(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void) => Promise<PluginListenerHandle>
551
561
  ```
552
562
 
553
563
  Unimplemented
@@ -557,7 +567,7 @@ Unimplemented
557
567
  | **`eventName`** | <code><a href="#banneradpluginevents">BannerAdPluginEvents.AdImpression</a></code> | AdImpression |
558
568
  | **`listenerFunc`** | <code>() =&gt; void</code> | |
559
569
 
560
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
570
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
561
571
 
562
572
  --------------------
563
573
 
@@ -634,7 +644,7 @@ Show interstitial ad when it’s ready
634
644
  ### addListener(InterstitialAdPluginEvents.FailedToLoad, ...)
635
645
 
636
646
  ```typescript
637
- addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle
647
+ addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
638
648
  ```
639
649
 
640
650
  | Param | Type |
@@ -642,7 +652,7 @@ addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (e
642
652
  | **`eventName`** | <code><a href="#interstitialadpluginevents">InterstitialAdPluginEvents.FailedToLoad</a></code> |
643
653
  | **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) =&gt; void</code> |
644
654
 
645
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
655
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
646
656
 
647
657
  --------------------
648
658
 
@@ -650,7 +660,7 @@ addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (e
650
660
  ### addListener(InterstitialAdPluginEvents.Loaded, ...)
651
661
 
652
662
  ```typescript
653
- addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => PluginListenerHandle
663
+ addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => Promise<PluginListenerHandle>
654
664
  ```
655
665
 
656
666
  | Param | Type |
@@ -658,7 +668,7 @@ addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: A
658
668
  | **`eventName`** | <code><a href="#interstitialadpluginevents">InterstitialAdPluginEvents.Loaded</a></code> |
659
669
  | **`listenerFunc`** | <code>(info: <a href="#adloadinfo">AdLoadInfo</a>) =&gt; void</code> |
660
670
 
661
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
671
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
662
672
 
663
673
  --------------------
664
674
 
@@ -666,7 +676,7 @@ addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: A
666
676
  ### addListener(InterstitialAdPluginEvents.Dismissed, ...)
667
677
 
668
678
  ```typescript
669
- addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void) => PluginListenerHandle
679
+ addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void) => Promise<PluginListenerHandle>
670
680
  ```
671
681
 
672
682
  | Param | Type |
@@ -674,7 +684,7 @@ addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () =>
674
684
  | **`eventName`** | <code><a href="#interstitialadpluginevents">InterstitialAdPluginEvents.Dismissed</a></code> |
675
685
  | **`listenerFunc`** | <code>() =&gt; void</code> |
676
686
 
677
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
687
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
678
688
 
679
689
  --------------------
680
690
 
@@ -682,7 +692,7 @@ addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () =>
682
692
  ### addListener(InterstitialAdPluginEvents.FailedToShow, ...)
683
693
 
684
694
  ```typescript
685
- addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle
695
+ addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
686
696
  ```
687
697
 
688
698
  | Param | Type |
@@ -690,7 +700,7 @@ addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (e
690
700
  | **`eventName`** | <code><a href="#interstitialadpluginevents">InterstitialAdPluginEvents.FailedToShow</a></code> |
691
701
  | **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) =&gt; void</code> |
692
702
 
693
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
703
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
694
704
 
695
705
  --------------------
696
706
 
@@ -698,7 +708,7 @@ addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (e
698
708
  ### addListener(InterstitialAdPluginEvents.Showed, ...)
699
709
 
700
710
  ```typescript
701
- addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void) => PluginListenerHandle
711
+ addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void) => Promise<PluginListenerHandle>
702
712
  ```
703
713
 
704
714
  | Param | Type |
@@ -706,7 +716,7 @@ addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => vo
706
716
  | **`eventName`** | <code><a href="#interstitialadpluginevents">InterstitialAdPluginEvents.Showed</a></code> |
707
717
  | **`listenerFunc`** | <code>() =&gt; void</code> |
708
718
 
709
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
719
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
710
720
 
711
721
  --------------------
712
722
 
@@ -744,7 +754,7 @@ Show a reward video ad
744
754
  ### addListener(RewardAdPluginEvents.FailedToLoad, ...)
745
755
 
746
756
  ```typescript
747
- addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle
757
+ addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
748
758
  ```
749
759
 
750
760
  | Param | Type |
@@ -752,7 +762,7 @@ addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error:
752
762
  | **`eventName`** | <code><a href="#rewardadpluginevents">RewardAdPluginEvents.FailedToLoad</a></code> |
753
763
  | **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) =&gt; void</code> |
754
764
 
755
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
765
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
756
766
 
757
767
  --------------------
758
768
 
@@ -760,7 +770,7 @@ addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error:
760
770
  ### addListener(RewardAdPluginEvents.Loaded, ...)
761
771
 
762
772
  ```typescript
763
- addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => PluginListenerHandle
773
+ addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => Promise<PluginListenerHandle>
764
774
  ```
765
775
 
766
776
  | Param | Type |
@@ -768,7 +778,7 @@ addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadI
768
778
  | **`eventName`** | <code><a href="#rewardadpluginevents">RewardAdPluginEvents.Loaded</a></code> |
769
779
  | **`listenerFunc`** | <code>(info: <a href="#adloadinfo">AdLoadInfo</a>) =&gt; void</code> |
770
780
 
771
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
781
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
772
782
 
773
783
  --------------------
774
784
 
@@ -776,7 +786,7 @@ addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadI
776
786
  ### addListener(RewardAdPluginEvents.Rewarded, ...)
777
787
 
778
788
  ```typescript
779
- addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void) => PluginListenerHandle
789
+ addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void) => Promise<PluginListenerHandle>
780
790
  ```
781
791
 
782
792
  | Param | Type |
@@ -784,7 +794,7 @@ addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdM
784
794
  | **`eventName`** | <code><a href="#rewardadpluginevents">RewardAdPluginEvents.Rewarded</a></code> |
785
795
  | **`listenerFunc`** | <code>(reward: <a href="#admobrewarditem">AdMobRewardItem</a>) =&gt; void</code> |
786
796
 
787
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
797
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
788
798
 
789
799
  --------------------
790
800
 
@@ -792,7 +802,7 @@ addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdM
792
802
  ### addListener(RewardAdPluginEvents.Dismissed, ...)
793
803
 
794
804
  ```typescript
795
- addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void) => PluginListenerHandle
805
+ addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void) => Promise<PluginListenerHandle>
796
806
  ```
797
807
 
798
808
  | Param | Type |
@@ -800,7 +810,7 @@ addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void)
800
810
  | **`eventName`** | <code><a href="#rewardadpluginevents">RewardAdPluginEvents.Dismissed</a></code> |
801
811
  | **`listenerFunc`** | <code>() =&gt; void</code> |
802
812
 
803
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
813
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
804
814
 
805
815
  --------------------
806
816
 
@@ -808,7 +818,7 @@ addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void)
808
818
  ### addListener(RewardAdPluginEvents.FailedToShow, ...)
809
819
 
810
820
  ```typescript
811
- addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle
821
+ addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
812
822
  ```
813
823
 
814
824
  | Param | Type |
@@ -816,7 +826,7 @@ addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error:
816
826
  | **`eventName`** | <code><a href="#rewardadpluginevents">RewardAdPluginEvents.FailedToShow</a></code> |
817
827
  | **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) =&gt; void</code> |
818
828
 
819
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
829
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
820
830
 
821
831
  --------------------
822
832
 
@@ -824,7 +834,7 @@ addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error:
824
834
  ### addListener(RewardAdPluginEvents.Showed, ...)
825
835
 
826
836
  ```typescript
827
- addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) => PluginListenerHandle
837
+ addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) => Promise<PluginListenerHandle>
828
838
  ```
829
839
 
830
840
  | Param | Type |
@@ -832,7 +842,7 @@ addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) =>
832
842
  | **`eventName`** | <code><a href="#rewardadpluginevents">RewardAdPluginEvents.Showed</a></code> |
833
843
  | **`listenerFunc`** | <code>() =&gt; void</code> |
834
844
 
835
- **Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
845
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
836
846
 
837
847
  --------------------
838
848
 
@@ -4,18 +4,18 @@ ext {
4
4
  androidxCoordinatorLayoutVersion = project.hasProperty('androidxCoordinatorLayoutVersion') ? rootProject.ext.androidxCoordinatorLayoutVersion : '1.2.0'
5
5
  androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
6
6
  androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
7
- playServicesAdsVersion = project.hasProperty('playServicesAdsVersion') ? rootProject.ext.playServicesAdsVersion : '22.4.0'
8
- androidxCoreKTXVersion = project.hasProperty('androidxCoreKTXVersion') ? rootProject.ext.androidxCoreKTXVersion : '1.10.0'
7
+ playServicesAdsVersion = project.hasProperty('playServicesAdsVersion') ? rootProject.ext.playServicesAdsVersion : '23.0.0'
8
+ androidxCoreKTXVersion = project.hasProperty('androidxCoreKTXVersion') ? rootProject.ext.androidxCoreKTXVersion : '1.13.0'
9
9
  }
10
10
 
11
11
  buildscript {
12
- ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.8.20'
12
+ ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.10'
13
13
  repositories {
14
14
  google()
15
15
  mavenCentral()
16
16
  }
17
17
  dependencies {
18
- classpath 'com.android.tools.build:gradle:8.0.0'
18
+ classpath 'com.android.tools.build:gradle:8.2.1'
19
19
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
20
20
  }
21
21
  }
@@ -25,10 +25,10 @@ apply plugin: 'kotlin-android'
25
25
 
26
26
  android {
27
27
  namespace "com.getcapacitor.community.admob.admob"
28
- compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
28
+ compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
29
29
  defaultConfig {
30
30
  minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
31
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
31
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
32
32
  versionCode 1
33
33
  versionName "1.0"
34
34
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
package/dist/docs.json CHANGED
@@ -352,7 +352,7 @@
352
352
  },
353
353
  {
354
354
  "name": "addListener",
355
- "signature": "(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void) => PluginListenerHandle",
355
+ "signature": "(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void) => Promise<PluginListenerHandle>",
356
356
  "parameters": [
357
357
  {
358
358
  "name": "eventName",
@@ -365,7 +365,7 @@
365
365
  "type": "(info: AdMobBannerSize) => void"
366
366
  }
367
367
  ],
368
- "returns": "PluginListenerHandle",
368
+ "returns": "Promise<PluginListenerHandle>",
369
369
  "tags": [
370
370
  {
371
371
  "name": "group",
@@ -422,7 +422,7 @@
422
422
  },
423
423
  {
424
424
  "name": "addListener",
425
- "signature": "(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void) => PluginListenerHandle",
425
+ "signature": "(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void) => Promise<PluginListenerHandle>",
426
426
  "parameters": [
427
427
  {
428
428
  "name": "eventName",
@@ -435,7 +435,7 @@
435
435
  "type": "() => void"
436
436
  }
437
437
  ],
438
- "returns": "PluginListenerHandle",
438
+ "returns": "Promise<PluginListenerHandle>",
439
439
  "tags": [
440
440
  {
441
441
  "name": "group",
@@ -491,7 +491,7 @@
491
491
  },
492
492
  {
493
493
  "name": "addListener",
494
- "signature": "(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void) => PluginListenerHandle",
494
+ "signature": "(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void) => Promise<PluginListenerHandle>",
495
495
  "parameters": [
496
496
  {
497
497
  "name": "eventName",
@@ -504,7 +504,7 @@
504
504
  "type": "(info: AdMobError) => void"
505
505
  }
506
506
  ],
507
- "returns": "PluginListenerHandle",
507
+ "returns": "Promise<PluginListenerHandle>",
508
508
  "tags": [
509
509
  {
510
510
  "name": "group",
@@ -561,7 +561,7 @@
561
561
  },
562
562
  {
563
563
  "name": "addListener",
564
- "signature": "(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void) => PluginListenerHandle",
564
+ "signature": "(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void) => Promise<PluginListenerHandle>",
565
565
  "parameters": [
566
566
  {
567
567
  "name": "eventName",
@@ -574,7 +574,7 @@
574
574
  "type": "() => void"
575
575
  }
576
576
  ],
577
- "returns": "PluginListenerHandle",
577
+ "returns": "Promise<PluginListenerHandle>",
578
578
  "tags": [
579
579
  {
580
580
  "name": "group",
@@ -630,7 +630,7 @@
630
630
  },
631
631
  {
632
632
  "name": "addListener",
633
- "signature": "(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void) => PluginListenerHandle",
633
+ "signature": "(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void) => Promise<PluginListenerHandle>",
634
634
  "parameters": [
635
635
  {
636
636
  "name": "eventName",
@@ -643,7 +643,7 @@
643
643
  "type": "() => void"
644
644
  }
645
645
  ],
646
- "returns": "PluginListenerHandle",
646
+ "returns": "Promise<PluginListenerHandle>",
647
647
  "tags": [
648
648
  {
649
649
  "name": "group",
@@ -699,7 +699,7 @@
699
699
  },
700
700
  {
701
701
  "name": "addListener",
702
- "signature": "(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void) => PluginListenerHandle",
702
+ "signature": "(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void) => Promise<PluginListenerHandle>",
703
703
  "parameters": [
704
704
  {
705
705
  "name": "eventName",
@@ -712,7 +712,7 @@
712
712
  "type": "() => void"
713
713
  }
714
714
  ],
715
- "returns": "PluginListenerHandle",
715
+ "returns": "Promise<PluginListenerHandle>",
716
716
  "tags": [
717
717
  {
718
718
  "name": "group",
@@ -967,7 +967,7 @@
967
967
  },
968
968
  {
969
969
  "name": "addListener",
970
- "signature": "(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle",
970
+ "signature": "(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>",
971
971
  "parameters": [
972
972
  {
973
973
  "name": "eventName",
@@ -980,7 +980,7 @@
980
980
  "type": "(error: AdMobError) => void"
981
981
  }
982
982
  ],
983
- "returns": "PluginListenerHandle",
983
+ "returns": "Promise<PluginListenerHandle>",
984
984
  "tags": [],
985
985
  "docs": "",
986
986
  "complexTypes": [
@@ -992,7 +992,7 @@
992
992
  },
993
993
  {
994
994
  "name": "addListener",
995
- "signature": "(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => PluginListenerHandle",
995
+ "signature": "(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => Promise<PluginListenerHandle>",
996
996
  "parameters": [
997
997
  {
998
998
  "name": "eventName",
@@ -1005,7 +1005,7 @@
1005
1005
  "type": "(info: AdLoadInfo) => void"
1006
1006
  }
1007
1007
  ],
1008
- "returns": "PluginListenerHandle",
1008
+ "returns": "Promise<PluginListenerHandle>",
1009
1009
  "tags": [],
1010
1010
  "docs": "",
1011
1011
  "complexTypes": [
@@ -1017,7 +1017,7 @@
1017
1017
  },
1018
1018
  {
1019
1019
  "name": "addListener",
1020
- "signature": "(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void) => PluginListenerHandle",
1020
+ "signature": "(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void) => Promise<PluginListenerHandle>",
1021
1021
  "parameters": [
1022
1022
  {
1023
1023
  "name": "eventName",
@@ -1030,7 +1030,7 @@
1030
1030
  "type": "() => void"
1031
1031
  }
1032
1032
  ],
1033
- "returns": "PluginListenerHandle",
1033
+ "returns": "Promise<PluginListenerHandle>",
1034
1034
  "tags": [],
1035
1035
  "docs": "",
1036
1036
  "complexTypes": [
@@ -1041,7 +1041,7 @@
1041
1041
  },
1042
1042
  {
1043
1043
  "name": "addListener",
1044
- "signature": "(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle",
1044
+ "signature": "(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>",
1045
1045
  "parameters": [
1046
1046
  {
1047
1047
  "name": "eventName",
@@ -1054,7 +1054,7 @@
1054
1054
  "type": "(error: AdMobError) => void"
1055
1055
  }
1056
1056
  ],
1057
- "returns": "PluginListenerHandle",
1057
+ "returns": "Promise<PluginListenerHandle>",
1058
1058
  "tags": [],
1059
1059
  "docs": "",
1060
1060
  "complexTypes": [
@@ -1066,7 +1066,7 @@
1066
1066
  },
1067
1067
  {
1068
1068
  "name": "addListener",
1069
- "signature": "(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void) => PluginListenerHandle",
1069
+ "signature": "(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void) => Promise<PluginListenerHandle>",
1070
1070
  "parameters": [
1071
1071
  {
1072
1072
  "name": "eventName",
@@ -1079,7 +1079,7 @@
1079
1079
  "type": "() => void"
1080
1080
  }
1081
1081
  ],
1082
- "returns": "PluginListenerHandle",
1082
+ "returns": "Promise<PluginListenerHandle>",
1083
1083
  "tags": [],
1084
1084
  "docs": "",
1085
1085
  "complexTypes": [
@@ -1176,7 +1176,7 @@
1176
1176
  },
1177
1177
  {
1178
1178
  "name": "addListener",
1179
- "signature": "(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle",
1179
+ "signature": "(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>",
1180
1180
  "parameters": [
1181
1181
  {
1182
1182
  "name": "eventName",
@@ -1189,7 +1189,7 @@
1189
1189
  "type": "(error: AdMobError) => void"
1190
1190
  }
1191
1191
  ],
1192
- "returns": "PluginListenerHandle",
1192
+ "returns": "Promise<PluginListenerHandle>",
1193
1193
  "tags": [],
1194
1194
  "docs": "",
1195
1195
  "complexTypes": [
@@ -1201,7 +1201,7 @@
1201
1201
  },
1202
1202
  {
1203
1203
  "name": "addListener",
1204
- "signature": "(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => PluginListenerHandle",
1204
+ "signature": "(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => Promise<PluginListenerHandle>",
1205
1205
  "parameters": [
1206
1206
  {
1207
1207
  "name": "eventName",
@@ -1214,7 +1214,7 @@
1214
1214
  "type": "(info: AdLoadInfo) => void"
1215
1215
  }
1216
1216
  ],
1217
- "returns": "PluginListenerHandle",
1217
+ "returns": "Promise<PluginListenerHandle>",
1218
1218
  "tags": [],
1219
1219
  "docs": "",
1220
1220
  "complexTypes": [
@@ -1226,7 +1226,7 @@
1226
1226
  },
1227
1227
  {
1228
1228
  "name": "addListener",
1229
- "signature": "(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void) => PluginListenerHandle",
1229
+ "signature": "(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void) => Promise<PluginListenerHandle>",
1230
1230
  "parameters": [
1231
1231
  {
1232
1232
  "name": "eventName",
@@ -1239,7 +1239,7 @@
1239
1239
  "type": "(reward: AdMobRewardItem) => void"
1240
1240
  }
1241
1241
  ],
1242
- "returns": "PluginListenerHandle",
1242
+ "returns": "Promise<PluginListenerHandle>",
1243
1243
  "tags": [],
1244
1244
  "docs": "",
1245
1245
  "complexTypes": [
@@ -1251,7 +1251,7 @@
1251
1251
  },
1252
1252
  {
1253
1253
  "name": "addListener",
1254
- "signature": "(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void) => PluginListenerHandle",
1254
+ "signature": "(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void) => Promise<PluginListenerHandle>",
1255
1255
  "parameters": [
1256
1256
  {
1257
1257
  "name": "eventName",
@@ -1264,7 +1264,7 @@
1264
1264
  "type": "() => void"
1265
1265
  }
1266
1266
  ],
1267
- "returns": "PluginListenerHandle",
1267
+ "returns": "Promise<PluginListenerHandle>",
1268
1268
  "tags": [],
1269
1269
  "docs": "",
1270
1270
  "complexTypes": [
@@ -1275,7 +1275,7 @@
1275
1275
  },
1276
1276
  {
1277
1277
  "name": "addListener",
1278
- "signature": "(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle",
1278
+ "signature": "(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>",
1279
1279
  "parameters": [
1280
1280
  {
1281
1281
  "name": "eventName",
@@ -1288,7 +1288,7 @@
1288
1288
  "type": "(error: AdMobError) => void"
1289
1289
  }
1290
1290
  ],
1291
- "returns": "PluginListenerHandle",
1291
+ "returns": "Promise<PluginListenerHandle>",
1292
1292
  "tags": [],
1293
1293
  "docs": "",
1294
1294
  "complexTypes": [
@@ -1300,7 +1300,7 @@
1300
1300
  },
1301
1301
  {
1302
1302
  "name": "addListener",
1303
- "signature": "(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) => PluginListenerHandle",
1303
+ "signature": "(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) => Promise<PluginListenerHandle>",
1304
1304
  "parameters": [
1305
1305
  {
1306
1306
  "name": "eventName",
@@ -1313,7 +1313,7 @@
1313
1313
  "type": "() => void"
1314
1314
  }
1315
1315
  ],
1316
- "returns": "PluginListenerHandle",
1316
+ "returns": "Promise<PluginListenerHandle>",
1317
1317
  "tags": [],
1318
1318
  "docs": "",
1319
1319
  "complexTypes": [
@@ -7,12 +7,12 @@ import type { AdMobBannerSize } from './banner-size.interface';
7
7
  export declare type BannerDefinitionsHasAllEvents = ValidateAllEventsEnumAreImplemented<BannerAdPluginEvents, BannerDefinitions>;
8
8
  export interface BannerDefinitions {
9
9
  /**
10
- * Show a banner Ad
11
- *
12
- * @group Banner
13
- * @param options AdOptions
14
- * @since 1.1.2
15
- */
10
+ * Show a banner Ad
11
+ *
12
+ * @group Banner
13
+ * @param options AdOptions
14
+ * @since 1.1.2
15
+ */
16
16
  showBanner(options: BannerAdOptions): Promise<void>;
17
17
  /**
18
18
  * Hide the banner, remove it from screen, but can show it later
@@ -36,13 +36,13 @@ export interface BannerDefinitions {
36
36
  */
37
37
  removeBanner(): Promise<void>;
38
38
  /**
39
- *
40
- * @group Banner
41
- * @param eventName bannerAdSizeChanged
42
- * @param listenerFunc
43
- * @since 3.0.0
44
- */
45
- addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void): PluginListenerHandle;
39
+ *
40
+ * @group Banner
41
+ * @param eventName bannerAdSizeChanged
42
+ * @param listenerFunc
43
+ * @since 3.0.0
44
+ */
45
+ addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void): Promise<PluginListenerHandle>;
46
46
  /**
47
47
  * Notice: request loaded Banner ad
48
48
  *
@@ -51,7 +51,7 @@ export interface BannerDefinitions {
51
51
  * @param listenerFunc
52
52
  * @since 3.0.0
53
53
  */
54
- addListener(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void): PluginListenerHandle;
54
+ addListener(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void): Promise<PluginListenerHandle>;
55
55
  /**
56
56
  * Notice: request failed Banner ad
57
57
  *
@@ -60,7 +60,7 @@ export interface BannerDefinitions {
60
60
  * @param listenerFunc
61
61
  * @since 3.0.0
62
62
  */
63
- addListener(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void): PluginListenerHandle;
63
+ addListener(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void): Promise<PluginListenerHandle>;
64
64
  /**
65
65
  * Notice: full-screen banner view will be presented in response to the user clicking on an ad.
66
66
  *
@@ -69,7 +69,7 @@ export interface BannerDefinitions {
69
69
  * @param listenerFunc
70
70
  * @since 3.0.0
71
71
  */
72
- addListener(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void): PluginListenerHandle;
72
+ addListener(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void): Promise<PluginListenerHandle>;
73
73
  /**
74
74
  * Notice: The full-screen banner view will been dismissed.
75
75
  *
@@ -78,7 +78,7 @@ export interface BannerDefinitions {
78
78
  * @param listenerFunc
79
79
  * @since 3.0.0
80
80
  */
81
- addListener(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void): PluginListenerHandle;
81
+ addListener(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void): Promise<PluginListenerHandle>;
82
82
  /**
83
83
  * Unimplemented
84
84
  *
@@ -87,5 +87,5 @@ export interface BannerDefinitions {
87
87
  * @param listenerFunc
88
88
  * @since 3.0.0
89
89
  */
90
- addListener(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void): PluginListenerHandle;
90
+ addListener(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void): Promise<PluginListenerHandle>;
91
91
  }
@@ -19,9 +19,9 @@ export interface InterstitialDefinitions {
19
19
  * @since 1.1.2
20
20
  */
21
21
  showInterstitial(): Promise<void>;
22
- addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void): PluginListenerHandle;
23
- addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void): PluginListenerHandle;
24
- addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void): PluginListenerHandle;
25
- addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void): PluginListenerHandle;
26
- addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void): PluginListenerHandle;
22
+ addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void): Promise<PluginListenerHandle>;
23
+ addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void): Promise<PluginListenerHandle>;
24
+ addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void): Promise<PluginListenerHandle>;
25
+ addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void): Promise<PluginListenerHandle>;
26
+ addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void): Promise<PluginListenerHandle>;
27
27
  }
@@ -2,7 +2,7 @@ import type { PluginListenerHandle } from '@capacitor/core';
2
2
  declare type Contra<T> = (x: T) => void;
3
3
  declare type UnwrapContra<T> = [T] extends [Contra<infer S>] ? S : never;
4
4
  declare type UnionToIntersection<U> = UnwrapContra<U extends any ? Contra<U> : never>;
5
- declare type Overload<T> = (eventName: T, listenerFunc: (...args: any[]) => any) => PluginListenerHandle;
5
+ declare type Overload<T> = (eventName: T, listenerFunc: (...args: any[]) => any) => Promise<PluginListenerHandle>;
6
6
  declare type OverloadUnionForEnum<T> = T extends any ? Overload<T> : never;
7
7
  declare type OverloadUnion<T> = OverloadUnionForEnum<T>;
8
8
  declare type Overloads<T> = UnionToIntersection<OverloadUnion<T>>;
@@ -7,12 +7,12 @@ import type { AdMobRewardItem } from './reward-item.interface';
7
7
  export declare type RewardDefinitionsHasAllEvents = ValidateAllEventsEnumAreImplemented<RewardAdPluginEvents, RewardDefinitions>;
8
8
  export interface RewardDefinitions {
9
9
  /**
10
- * Prepare a reward video ad
11
- *
12
- * @group RewardVideo
13
- * @param options RewardAdOptions
14
- * @since 1.1.2
15
- */
10
+ * Prepare a reward video ad
11
+ *
12
+ * @group RewardVideo
13
+ * @param options RewardAdOptions
14
+ * @since 1.1.2
15
+ */
16
16
  prepareRewardVideoAd(options: RewardAdOptions): Promise<AdLoadInfo>;
17
17
  /**
18
18
  * Show a reward video ad
@@ -21,10 +21,10 @@ export interface RewardDefinitions {
21
21
  * @since 1.1.2
22
22
  */
23
23
  showRewardVideoAd(): Promise<AdMobRewardItem>;
24
- addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void): PluginListenerHandle;
25
- addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void): PluginListenerHandle;
26
- addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void): PluginListenerHandle;
27
- addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void): PluginListenerHandle;
28
- addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void): PluginListenerHandle;
29
- addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void): PluginListenerHandle;
24
+ addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void): Promise<PluginListenerHandle>;
25
+ addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void): Promise<PluginListenerHandle>;
26
+ addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void): Promise<PluginListenerHandle>;
27
+ addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void): Promise<PluginListenerHandle>;
28
+ addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void): Promise<PluginListenerHandle>;
29
+ addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void): Promise<PluginListenerHandle>;
30
30
  }
package/dist/esm/web.d.ts CHANGED
@@ -4,9 +4,7 @@ import type { AdMobRewardItem } from './reward';
4
4
  import type { AdOptions, AdLoadInfo } from './shared';
5
5
  import type { TrackingAuthorizationStatusInterface } from './shared/tracking-authorization-status.interface';
6
6
  export declare class AdMobWeb extends WebPlugin implements AdMobPlugin {
7
- constructor();
8
7
  initialize(): Promise<void>;
9
- targetSettings(): Promise<void>;
10
8
  requestTrackingAuthorization(): Promise<void>;
11
9
  trackingAuthorizationStatus(): Promise<TrackingAuthorizationStatusInterface>;
12
10
  requestConsentInfo(options?: AdmobConsentRequestOptions): Promise<AdmobConsentInfo>;
package/dist/esm/web.js CHANGED
@@ -1,18 +1,9 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
2
  import { AdmobConsentStatus } from './consent/consent-status.enum';
3
3
  export class AdMobWeb extends WebPlugin {
4
- constructor() {
5
- super({
6
- name: 'AdMob',
7
- platforms: ['web'],
8
- });
9
- }
10
4
  async initialize() {
11
5
  console.log('initialize');
12
6
  }
13
- async targetSettings() {
14
- console.log('targetSettings');
15
- }
16
7
  async requestTrackingAuthorization() {
17
8
  console.log('requestTrackingAuthorization');
18
9
  }
@@ -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,MAAM,+BAA+B,CAAC;AAKnE,MAAM,OAAO,QAAS,SAAQ,SAAS;IACrC;QACE,KAAK,CAAC;YACJ,IAAI,EAAE,OAAO;YACb,SAAS,EAAE,CAAC,KAAK,CAAC;SACnB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,UAAU;QACd,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,4BAA4B;QAChC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,2BAA2B;QAC/B,OAAO;YACL,MAAM,EAAE,YAAY;SACrB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,kBAAkB,CACtB,OAAoC;QAEpC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QAC3C,OAAO;YACL,MAAM,EAAE,kBAAkB,CAAC,QAAQ;YACnC,sBAAsB,EAAE,IAAI;SAC7B,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,eAA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C,GAAG,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,OAAkB;QACjC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,gEAAgE;IAChE,KAAK,CAAC,UAAU;QACd,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC;IAED,wCAAwC;IACxC,KAAK,CAAC,YAAY;QAChB,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC9B,CAAC;IAED,6CAA6C;IAC7C,KAAK,CAAC,YAAY;QAChB,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,OAAkB;QAC1C,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;QAC5C,OAAO;YACL,QAAQ,EAAE,OAAO,CAAC,IAAI;SACvB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,OAAkB;QAC3C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrB,OAAO;YACL,QAAQ,EAAE,OAAO,CAAC,IAAI;SACvB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,OAAO;YACL,IAAI,EAAE,EAAE;YACR,MAAM,EAAE,CAAC;SACV,CAAC;IACJ,CAAC;CACF"}
@@ -218,18 +218,9 @@ const AdMob = core.registerPlugin('AdMob', {
218
218
  });
219
219
 
220
220
  class AdMobWeb extends core.WebPlugin {
221
- constructor() {
222
- super({
223
- name: 'AdMob',
224
- platforms: ['web'],
225
- });
226
- }
227
221
  async initialize() {
228
222
  console.log('initialize');
229
223
  }
230
- async targetSettings() {
231
- console.log('targetSettings');
232
- }
233
224
  async requestTrackingAuthorization() {
234
225
  console.log('requestTrackingAuthorization');
235
226
  }
@@ -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/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 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/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 constructor() {\n super({\n name: 'AdMob',\n platforms: ['web'],\n });\n }\n async initialize() {\n console.log('initialize');\n }\n async targetSettings() {\n console.log('targetSettings');\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}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","registerPlugin","WebPlugin"],"mappings":";;;;;;AAAWA,oCAAm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,CAAC,kBAAkB,CAAC,CAAC;AACxC,KAAK;AACL,IAAI,MAAM,oBAAoB,CAAC,OAAO,EAAE;AACxC,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC7B,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;AAClC,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,EAAE;AACpB,YAAY,MAAM,EAAE,CAAC;AACrB,SAAS,CAAC;AACV,KAAK;AACL;;;;;;;;;"}
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/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 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/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}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","registerPlugin","WebPlugin"],"mappings":";;;;;;AAAWA,oCAAmB;AAC9B,CAAC,UAAU,kBAAkB,EAAE;AAC/B;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAC9C;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;AAChE;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AACxC;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AAC5D,CAAC,EAAEA,0BAAkB,KAAKA,0BAAkB,GAAG,EAAE,CAAC,CAAC;;AClBnD;AACWC,sCAAqB;AAChC,CAAC,UAAU,oBAAoB,EAAE;AACjC,IAAI,oBAAoB,CAAC,aAAa,CAAC,GAAG,qBAAqB,CAAC;AAChE,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC;AACtD,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,sBAAsB,CAAC;AAClE;AACA;AACA;AACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC;AACtD;AACA;AACA;AACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC;AACtD;AACA;AACA;AACA,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,oBAAoB,CAAC;AAChE,CAAC,EAAEA,4BAAoB,KAAKA,4BAAoB,GAAG,EAAE,CAAC,CAAC;;AClBvD;AACA;AACA;AACWC,kCAAiB;AAC5B,CAAC,UAAU,gBAAgB,EAAE;AA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CAAC,CAAC;AACxC,KAAK;AACL,IAAI,MAAM,oBAAoB,CAAC,OAAO,EAAE;AACxC,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC7B,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;AAClC,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,EAAE;AACpB,YAAY,MAAM,EAAE,CAAC;AACrB,SAAS,CAAC;AACV,KAAK;AACL;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -215,18 +215,9 @@ var AdMobPlugin = (function (exports, core) {
215
215
  });
216
216
 
217
217
  class AdMobWeb extends core.WebPlugin {
218
- constructor() {
219
- super({
220
- name: 'AdMob',
221
- platforms: ['web'],
222
- });
223
- }
224
218
  async initialize() {
225
219
  console.log('initialize');
226
220
  }
227
- async targetSettings() {
228
- console.log('targetSettings');
229
- }
230
221
  async requestTrackingAuthorization() {
231
222
  console.log('requestTrackingAuthorization');
232
223
  }
@@ -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/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 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/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 constructor() {\n super({\n name: 'AdMob',\n platforms: ['web'],\n });\n }\n async initialize() {\n console.log('initialize');\n }\n async targetSettings() {\n console.log('targetSettings');\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}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","registerPlugin","WebPlugin"],"mappings":";;;AAAWA,wCAAmB;IAC9B,CAAC,UAAU,kBAAkB,EAAE;IAC/B;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAC9C;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;IAChE;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IACxC;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;IAC5D,CAAC,EAAEA,0BAAkB,KAAKA,0BAAkB,GAAG,EAAE,CAAC,CAAC;;IClBnD;AACWC,0CAAqB;IAChC,CAAC,UAAU,oBAAoB,EAAE;IACjC,IAAI,oBAAoB,CAAC,aAAa,CAAC,GAAG,qBAAqB,CAAC;IAChE,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC;IACtD,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,s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AAY,EAAE,OAAO,CAAC,CAAC;IAC3C,KAAK;IACL;IACA,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAClC,KAAK;IACL;IACA,IAAI,MAAM,YAAY,GAAG;IACzB,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACpC,KAAK;IACL;IACA,IAAI,MAAM,YAAY,GAAG;IACzB,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACpC,KAAK;IACL,IAAI,MAAM,mBAAmB,CAAC,OAAO,EAAE;IACvC,QAAQ,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IACpD,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IACxC,KAAK;IACL,IAAI,MAAM,oBAAoB,CAAC,OAAO,EAAE;IACxC,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,EAAE;IACpB,YAAY,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC;IACV,KAAK;IACL;;;;;;;;;;;;;;;;;"}
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/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 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/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}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","registerPlugin","WebPlugin"],"mappings":";;;AAAWA,wCAAmB;IAC9B,CAAC,UAAU,kBAAkB,EAAE;IAC/B;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAC9C;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;IAChE;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IACxC;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;IAC5D,CAAC,EAAEA,0BAAkB,KAAKA,0BAAkB,GAA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O,CAAC,CAAC;IAC3C,KAAK;IACL;IACA,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAClC,KAAK;IACL;IACA,IAAI,MAAM,YAAY,GAAG;IACzB,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACpC,KAAK;IACL;IACA,IAAI,MAAM,YAAY,GAAG;IACzB,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACpC,KAAK;IACL,IAAI,MAAM,mBAAmB,CAAC,OAAO,EAAE;IACvC,QAAQ,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IACpD,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IACxC,KAAK;IACL,IAAI,MAAM,oBAAoB,CAAC,OAAO,EAAE;IACxC,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,EAAE;IACpB,YAAY,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC;IACV,KAAK;IACL;;;;;;;;;;;;;;;;;"}
@@ -88,15 +88,9 @@ class BannerExecutor: NSObject, GADBannerViewDelegate {
88
88
  NSLog("AdMob: find subView for resumeBanner")
89
89
  subView.isHidden = false
90
90
 
91
- let width = subView.frame.width
92
- var height = subView.frame.height
93
- // For fixing issue 160 iOs banner overlapping content on iPhone with rounded corners
94
- let safeAreaBottom = UIApplication.shared.keyWindow?.safeAreaInsets.bottom ?? 0
95
- height += safeAreaBottom
96
-
97
91
  self.plugin?.notifyListeners(BannerAdPluginEvents.SizeChanged.rawValue, data: [
98
- "width": width,
99
- "height": height
92
+ "width": subView.frame.width,
93
+ "height": subView.frame.height
100
94
  ])
101
95
 
102
96
  call.resolve([:])
@@ -153,15 +147,9 @@ class BannerExecutor: NSObject, GADBannerViewDelegate {
153
147
  public func bannerViewDidReceiveAd(_ bannerView: GADBannerView) {
154
148
  NSLog("bannerViewDidReceiveAd")
155
149
 
156
- let width = bannerView.frame.width
157
- var height = bannerView.frame.height
158
- // For fixing issue 160 iOs banner overlapping content on iPhone with rounded corners
159
- let safeAreaBottom = UIApplication.shared.keyWindow?.safeAreaInsets.bottom ?? 0
160
- height += safeAreaBottom
161
-
162
150
  self.plugin?.notifyListeners(BannerAdPluginEvents.SizeChanged.rawValue, data: [
163
- "width": width,
164
- "height": height
151
+ "width": bannerView.frame.width,
152
+ "height": bannerView.frame.height
165
153
  ])
166
154
  self.plugin?.notifyListeners(BannerAdPluginEvents.Loaded.rawValue, data: [:])
167
155
  }
@@ -231,12 +231,12 @@ public class AdMob: CAPPlugin {
231
231
  GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = call.getArray("testingDevices", String.self) ?? []
232
232
  }
233
233
 
234
- if call.getBool("tagForChildDirectedTreatment") != nil {
235
- GADMobileAds.sharedInstance().requestConfiguration.tag(forChildDirectedTreatment: call.getBool("tagForChildDirectedTreatment")!)
234
+ if call.getBool("tagForChildDirectedTreatment") == true {
235
+ GADMobileAds.sharedInstance().requestConfiguration.tagForChildDirectedTreatment = true
236
236
  }
237
237
 
238
- if call.getBool("tagForUnderAgeOfConsent") != nil {
239
- GADMobileAds.sharedInstance().requestConfiguration.tagForUnderAge(ofConsent: call.getBool("tagForUnderAgeOfConsent")!)
238
+ if call.getBool("tagForUnderAgeOfConsent") == true {
239
+ GADMobileAds.sharedInstance().requestConfiguration.tagForUnderAgeOfConsent = true
240
240
  }
241
241
 
242
242
  if call.getString("maxAdContentRating") != nil {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@capacitor-community/admob",
3
- "version": "5.3.1",
3
+ "version": "6.0.0",
4
4
  "description": "A native plugin for AdMob",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/esm/index.d.ts",
8
8
  "unpkg": "dist/plugin.js",
9
9
  "engines": {
10
- "node": ">=16.0.0"
10
+ "node": ">=18.0.0"
11
11
  },
12
12
  "files": [
13
13
  "android/src/main/",
@@ -43,11 +43,11 @@
43
43
  "release": "np --no-tests"
44
44
  },
45
45
  "devDependencies": {
46
- "@capacitor/android": "5.0.0",
47
- "@capacitor/cli": "5.0.0",
48
- "@capacitor/core": "5.0.0",
46
+ "@capacitor/android": "^6.0.0",
47
+ "@capacitor/cli": "^6.0.0",
48
+ "@capacitor/core": "^6.0.0",
49
49
  "@capacitor/docgen": "git+https://github.com/rdlabo/capacitor-docgen.git#feat/support_extends_build",
50
- "@capacitor/ios": "next",
50
+ "@capacitor/ios": "^6.0.0",
51
51
  "@ionic/eslint-config": "^0.3.0",
52
52
  "@ionic/prettier-config": "^1.0.1",
53
53
  "@ionic/swiftlint-config": "^1.1.2",
@@ -64,7 +64,7 @@
64
64
  "typescript": "~4.1.5"
65
65
  },
66
66
  "dependencies": {
67
- "@capacitor/core": "next"
67
+ "@capacitor/core": "^6.0.0"
68
68
  },
69
69
  "husky": {
70
70
  "hooks": {