@@ -175,11 +175,11 @@ export class InterstitialAd implements IInterstitialAd {
175
175
176
176
load ( ) : void {
177
177
const ref = new WeakRef ( this ) ;
178
- this . _nativeRequest = org . nativescript . firebase . admob . FirebaseAdmob . InterstitialAd . load (
178
+ this . _nativeRequest = org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . InterstitialAd . load (
179
179
Application . android . foregroundActivity || Application . android . startActivity ,
180
180
this . _adUnitId ,
181
181
JSON . stringify ( this . _requestOptions || { } ) ,
182
- new org . nativescript . firebase . admob . FirebaseAdmob . AdCallback ( {
182
+ new org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . AdCallback ( {
183
183
onEvent ( event : string , dataOrError : any ) {
184
184
const owner = ref . get ?.( ) ;
185
185
switch ( event ) {
@@ -270,11 +270,11 @@ export class RewardedInterstitialAd implements IRewardedInterstitialAd {
270
270
271
271
load ( ) : void {
272
272
const ref = new WeakRef ( this ) ;
273
- this . _nativeRequest = org . nativescript . firebase . admob . FirebaseAdmob . RewardedInterstitialAd . load (
273
+ this . _nativeRequest = org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . RewardedInterstitialAd . load (
274
274
Application . android . foregroundActivity || Application . android . startActivity ,
275
275
this . _adUnitId ,
276
276
JSON . stringify ( this . _requestOptions || { } ) ,
277
- new org . nativescript . firebase . admob . FirebaseAdmob . AdCallback ( {
277
+ new org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . AdCallback ( {
278
278
onEvent ( event : string , dataOrError : any ) {
279
279
const owner = ref . get ?.( ) ;
280
280
switch ( event ) {
@@ -320,10 +320,10 @@ export class RewardedInterstitialAd implements IRewardedInterstitialAd {
320
320
this . native . setImmersiveMode ( showOptions ?. immersiveModeEnabled ) ;
321
321
}
322
322
const ref = new WeakRef ( this ) ;
323
- org . nativescript . firebase . admob . FirebaseAdmob . RewardedInterstitialAd . show (
323
+ org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . RewardedInterstitialAd . show (
324
324
Application . android . foregroundActivity || Application . android . startActivity ,
325
325
this . native ,
326
- new org . nativescript . firebase . admob . FirebaseAdmob . Callback < com . google . android . gms . ads . rewarded . RewardItem > ( {
326
+ new org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . Callback < com . google . android . gms . ads . rewarded . RewardItem > ( {
327
327
onSuccess ( reward ) : void {
328
328
ref . get ( ) ?. _onAdEvent ?.( RewardedAdEventType . EARNED_REWARD , null , RewardedItem . fromNative ( reward ) ) ;
329
329
} ,
@@ -392,11 +392,11 @@ export class RewardedAd implements IRewardedAd {
392
392
393
393
load ( ) : void {
394
394
const ref = new WeakRef ( this ) ;
395
- this . _nativeRequest = org . nativescript . firebase . admob . FirebaseAdmob . RewardedAd . load (
395
+ this . _nativeRequest = org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . RewardedAd . load (
396
396
Application . android . foregroundActivity || Application . android . startActivity ,
397
397
this . adUnitId ,
398
398
JSON . stringify ( this . _requestOptions || { } ) ,
399
- new org . nativescript . firebase . admob . FirebaseAdmob . AdCallback ( {
399
+ new org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . AdCallback ( {
400
400
onEvent ( event : string , dataOrError : any ) {
401
401
const owner = ref . get ?.( ) ;
402
402
if ( ! owner ) {
@@ -445,10 +445,10 @@ export class RewardedAd implements IRewardedAd {
445
445
this . native . setImmersiveMode ( showOptions ?. immersiveModeEnabled ) ;
446
446
}
447
447
const ref = new WeakRef ( this ) ;
448
- org . nativescript . firebase . admob . FirebaseAdmob . RewardedAd . show (
448
+ org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . RewardedAd . show (
449
449
Application . android . foregroundActivity || Application . android . startActivity ,
450
450
this . native ,
451
- new org . nativescript . firebase . admob . FirebaseAdmob . Callback < com . google . android . gms . ads . rewarded . RewardItem > ( {
451
+ new org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . Callback < com . google . android . gms . ads . rewarded . RewardItem > ( {
452
452
onSuccess ( reward ) : void {
453
453
ref . get ( ) ?. _onAdEvent ?.( RewardedAdEventType . EARNED_REWARD , null , RewardedItem . fromNative ( reward ) ) ;
454
454
} ,
@@ -522,7 +522,6 @@ const MEDIUM_RECTANGLE = lazy(() => com.google.android.gms.ads.AdSize.MEDIUM_REC
522
522
523
523
const FLUID = lazy ( ( ) => com . google . android . gms . ads . AdSize . FLUID ) ;
524
524
const WIDE_SKYSCRAPER = lazy ( ( ) => com . google . android . gms . ads . AdSize . WIDE_SKYSCRAPER ) ;
525
- const SEARCH = lazy ( ( ) => com . google . android . gms . ads . AdSize . SEARCH ) ;
526
525
const INVALID = lazy ( ( ) => com . google . android . gms . ads . AdSize . INVALID ) ;
527
526
const FULL_WIDTH = lazy ( ( ) => com . google . android . gms . ads . AdSize . FULL_WIDTH ) ;
528
527
const AUTO_HEIGHT = lazy ( ( ) => com . google . android . gms . ads . AdSize . AUTO_HEIGHT ) ;
@@ -604,10 +603,6 @@ export class BannerAdSize extends BannerAdSizeBase {
604
603
return BannerAdSize . fromNative ( INVALID ( ) ) ;
605
604
}
606
605
607
- static get SEARCH ( ) : BannerAdSize {
608
- return BannerAdSize . fromNative ( SEARCH ( ) ) ;
609
- }
610
-
611
606
get native ( ) {
612
607
return this . _native ;
613
608
}
@@ -646,7 +641,7 @@ export class BannerAd extends BannerAdBase {
646
641
647
642
load ( options ?: RequestOptions ) {
648
643
if ( this . _native ) {
649
- this . _nativeRequest = org . nativescript . firebase . admob . FirebaseAdmob . BannerAd . load ( JSON . stringify ( options || { } ) , this . _native ) ;
644
+ this . _nativeRequest = org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . BannerAd . load ( JSON . stringify ( options || { } ) , this . _native ) ;
650
645
}
651
646
}
652
647
@@ -670,7 +665,7 @@ export class MobileAds implements IMobileAds {
670
665
onInitializationComplete ( status : com . google . android . gms . ads . initialization . InitializationStatus ) {
671
666
let data = { } ;
672
667
try {
673
- data = JSON . parse ( org . nativescript . firebase . admob . FirebaseAdmob . toJSONStatusMap ( status . getAdapterStatusMap ( ) ) ) ;
668
+ data = JSON . parse ( org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . toJSONStatusMap ( status . getAdapterStatusMap ( ) ) ) ;
674
669
} catch ( e ) {
675
670
// noop
676
671
}
@@ -699,7 +694,7 @@ export class MobileAds implements IMobileAds {
699
694
} else {
700
695
parsedConfiguration . tagForUnderAgeOfConsent = 'unspecified' ;
701
696
}
702
- org . nativescript . firebase . admob . FirebaseAdmob . setRequestConfiguration ( JSON . stringify ( requestConfiguration ) ) ;
697
+ org . nativescript . plugins . google_mobile_ads . GoogleMobileAds . setRequestConfiguration ( JSON . stringify ( requestConfiguration ) ) ;
703
698
} catch ( e ) {
704
699
// noop
705
700
}
0 commit comments