diff --git a/demo/angular/package-lock.json b/demo/angular/package-lock.json index 9594d040..510731e4 100644 --- a/demo/angular/package-lock.json +++ b/demo/angular/package-lock.json @@ -1505,14 +1505,6 @@ "to-fast-properties": "^2.0.0" } }, - "@capacitor-community/admob": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@capacitor-community/admob/-/admob-1.0.1.tgz", - "integrity": "sha512-hLrNluDid3FSA0Y17k8DIqJ9wMS99CJhwo0+2ImKfVnv2Pepp23pQ31vz9jSYqddvw5WixPIqSBmZiubIa2gAw==", - "requires": { - "@capacitor/core": "^2.0.0" - } - }, "@capacitor/android": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-2.4.2.tgz", diff --git a/demo/angular/package.json b/demo/angular/package.json index d4884767..efc16b41 100644 --- a/demo/angular/package.json +++ b/demo/angular/package.json @@ -20,7 +20,7 @@ "@angular/platform-browser": "~10.0.0", "@angular/platform-browser-dynamic": "~10.0.0", "@angular/router": "~10.0.0", - "@capacitor-community/admob": "latest", + "@capacitor-community/admob": "1.1.2", "@capacitor/android": "^2.4.2", "@capacitor/core": "^2.4.2", "@capacitor/ios": "^2.4.2", diff --git a/demo/angular/src/app/home/home.page.ts b/demo/angular/src/app/home/home.page.ts index 0271be41..6211680a 100644 --- a/demo/angular/src/app/home/home.page.ts +++ b/demo/angular/src/app/home/home.page.ts @@ -77,17 +77,22 @@ export class HomePage implements OnInit, OnDestroy { } }); - this.eventPrepareReward = AdMob.addListener('onRewardedVideoAdLoaded', (info: boolean) => { - this.isPrepareReward = true; - this.isLoading = false; + AdMob.addListener('onInterstitialAdLoaded', (info) => { + this.isPrepareInterstitial = true; }); /** * RewardedVideo ad */ + this.eventPrepareReward = AdMob.addListener('onRewardedVideoAdLoaded', (info: boolean) => { + this.isPrepareReward = true; + this.isLoading = false; + }); + AdMob.addListener('onRewarded', (info) => { this.eventRewardReceived = info; }); + AdMob.addListener('onRewardedVideoAdClosed', async (info) => { if (this.eventRewardReceived) { const toast = await this.toastCtrl.create({ @@ -213,7 +218,6 @@ export class HomePage implements OnInit, OnDestroy { if (result === undefined) { return; } - this.isPrepareInterstitial = true; }