emi-indo-cordova-plugin-admob 1.4.7 → 1.5.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.
Binary file
@@ -0,0 +1,21 @@
1
+ {
2
+ "version": 3,
3
+ "artifactType": {
4
+ "type": "APK",
5
+ "kind": "Directory"
6
+ },
7
+ "applicationId": "io.cordova.hellocordova",
8
+ "variantName": "debug",
9
+ "elements": [
10
+ {
11
+ "type": "SINGLE",
12
+ "filters": [],
13
+ "attributes": [],
14
+ "versionCode": 10000,
15
+ "versionName": "1.0.0",
16
+ "outputFile": "app-debug.apk"
17
+ }
18
+ ],
19
+ "elementType": "File",
20
+ "minSdkVersionForDexing": 24
21
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "xml.downloadExternalResources.enabled": true
3
+ }
package/README.md CHANGED
@@ -3,9 +3,15 @@
3
3
  # emi-indo-cordova-plugin-admob
4
4
  Cordova Plugin Admob Android and IOS
5
5
 
6
- ### Mobile Ads SDK (Android: 22.6.0) [Release Notes:](https://developers.google.com/admob/android/rel-notes)
6
+ ### Mobile Ads SDK (Android: 23.4.0) [Release Notes:](https://developers.google.com/admob/android/rel-notes)
7
+
8
+ ### Mobile Ads SDK (IOS: 11.10.0) [Release Notes:](https://developers.google.com/admob/ios/rel-notes)
9
+
10
+ ### User Messaging Platform (UMP: 3.0.0) [Release Notes:](https://developers.google.com/admob/android/privacy/release-notes)
11
+ ### IAB Europe Transparency & Consent Framework (CPM: 2.2.0)
12
+
13
+
7
14
 
8
- ### Mobile Ads SDK (IOS: 10.14.0) [Release Notes:](https://developers.google.com/admob/ios/rel-notes)
9
15
 
10
16
  ## Minimum Cordova Engines
11
17
  - cordova-android version = 12.0.0
@@ -62,6 +68,18 @@ https://developers.google.com/admob/ios/quick-start
62
68
 
63
69
  ## [Check all release notes:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/releases/)
64
70
 
71
+ > [!WARNING]
72
+ > WARNING options configuration was previously an array [], now v.1.4.9 or later must be an object{}
73
+ > example
74
+ ```
75
+ previous example
76
+ [ adUnitId = App_Open_ID, autoShow = true ] // Deprecated
77
+ now
78
+ { adUnitId: App_Open_ID, autoShow: true }
79
+
80
+ cordova.plugins.emiAdmobPlugin.loadAppOpenAd({ adUnitId: App_Open_ID, autoShow: true });
81
+ ```
82
+
65
83
  ## Features
66
84
  <details>
67
85
  <summary>Features #1</summary>
@@ -86,10 +104,7 @@ https://developers.google.com/admob/ios/quick-start
86
104
  ```sh
87
105
  cordova plugin add emi-indo-cordova-plugin-admob --save --variable APP_ID_ANDROID=ca-app-pub-xxx~xxx --variable APP_ID_IOS=ca-app-pub-xxx~xxx
88
106
  ```
89
- ### Or
90
- ```sh
91
- cordova plugin add https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob --save --variable APP_ID_ANDROID=ca-app-pub-xxx~xxx --variable APP_ID_IOS=ca-app-pub-xxx~xxx
92
- ```
107
+
93
108
  ## Remove
94
109
  ```sh
95
110
  cordova plugin rm emi-indo-cordova-plugin-admob
@@ -110,15 +125,38 @@ cordova plugin rm emi-indo-cordova-plugin-admob
110
125
  <details>
111
126
  <summary>Methods: #2</summary>
112
127
  <pre>
128
+
129
+ cordova.plugins.emiAdmobPlugin.initialize({
130
+
131
+ isUsingAdManagerRequest: true, // true = AdManagerAdRequest.Builder | false = AdRequest.Builder (Default true)
132
+ isResponseInfo: true, // Default false (Debug true)
133
+ isConsentDebug: true, // Default false (Debug true)
134
+
135
+ }
136
+
137
+ document.addEventListener('on.sdkInitialization', (data) => {
138
+ // JSON.stringify(data)
139
+ const sdkVersion = data.version;
140
+ // const adAdapter = data.adapters;
141
+ // const conStatus = data.consentStatus;
142
+ // const gdprApplie = data.gdprApplies;
143
+ // const purposeConsent = data.purposeConsents;
144
+ // const vendorConsents = data.vendorConsents;
145
+ // const conTCString = data.consentTCString;
146
+ // const additionalConsent = data.additionalConsent;
147
+ console.log("On Sdk Initialization version: " + sdkVersion);
148
+
149
+ });
150
+
113
151
  // Support Platform: Android | IOS
114
- cordova.plugins.emiAdmobPlugin.globalSettings([config_globalSettings]);
115
- cordova.plugins.emiAdmobPlugin.targeting([config_Targeting]);
116
- cordova.plugins.emiAdmobPlugin.initialize();
152
+ cordova.plugins.emiAdmobPlugin.globalSettings({config_globalSettings}); // Optional
153
+ cordova.plugins.emiAdmobPlugin.targeting({config_Targeting}); // Optional
117
154
  // UMP SDK 2.1.0
118
- cordova.plugins.emiAdmobPlugin.getConsentRequest(); // (Platform: Both)
119
- cordova.plugins.emiAdmobPlugin.consentReset(); // (Platform: Both)
120
- cordova.plugins.emiAdmobPlugin.showPrivacyOptionsForm(); // (Platform: Both)
155
+ cordova.plugins.emiAdmobPlugin.getConsentRequest(); // (Platform: Both) // Deprecated
156
+ cordova.plugins.emiAdmobPlugin.consentReset(); // (Platform: Both) // Optional
157
+ cordova.plugins.emiAdmobPlugin.showPrivacyOptionsForm(); // (Platform: Both) // Optional
121
158
  // CMP SDK 2.2.0
159
+ // Optional
122
160
  cordova.plugins.emiAdmobPlugin.requestIDFA(); // UMP SDK to handle Apple's App Tracking Transparency (ATT) (Platform: IOS)
123
161
  cordova.plugins.emiAdmobPlugin.getIabTfc((IABTFC) => { console.log(JSONstringify(IABTFC)) }); // CMP SDK 2.2 (Platform: Both)
124
162
 
@@ -131,7 +169,7 @@ must be false if the application is released to the play store / app store.
131
169
  consent from will continue to be called regardless of its status 0,1,2,3,
132
170
  until the value is changed to false.
133
171
 
134
- setDebugGeography = true | false
172
+ isConsentDebug: true | false
135
173
  </details>
136
174
  <li>example</li></ul>
137
175
  <pre>
@@ -139,28 +177,25 @@ setDebugGeography = true | false
139
177
 
140
178
  document.addEventListener("deviceready", function(){
141
179
 
142
- const config_globalSettings = [
143
-
144
- setAppMuted = false, // default: false
145
- setAppVolume = 1, // float: default: 1
146
- enableSameAppKey = false, // default: false
147
- npa = "1", // string "0" | "1"
148
- enableCollapsible = true, // (BETA) activate the collapsible banner ads
149
- responseInfo = false, // default: false
150
- setDebugGeography = false // default: false
151
-
152
- ]
180
+ document.addEventListener('on.sdkInitialization', (data) => {
181
+ // JSON.stringify(data)
182
+ const sdkVersion = data.version;
183
+ // const adAdapter = data.adapters;
184
+ // const conStatus = data.consentStatus;
185
+ // const gdprApplie = data.gdprApplies;
186
+ // const purposeConsent = data.purposeConsents;
187
+ // const vendorConsents = data.vendorConsents;
188
+ // const conTCString = data.consentTCString;
189
+ // const additionalConsent = data.additionalConsent;
190
+ console.log("On Sdk Initialization version: " + data.consentStatus);
153
191
 
154
- cordova.plugins.emiAdmobPlugin.getConsentRequest( (ststus) => { console.log("Consent Status: " + ststus) });
155
- cordova.plugins.emiAdmobPlugin.globalSettings(config_globalSettings);
156
-
157
- document.addEventListener('on.get.consent.status', () => {
158
- // Regardless of the state, call SDK initialize
159
-
160
- cordova.plugins.emiAdmobPlugin.initialize();
161
- cordova.plugins.emiAdmobPlugin.getIabTfc((IABTFC) => { console.log(JSONstringify(IABTFC)) });
162
192
  });
163
193
 
194
+ // cordova.plugins.emiAdmobPlugin.getConsentRequest( (ststus) => { console.log("Consent Status: " + ststus) }); // Deprecated
195
+ // cordova.plugins.emiAdmobPlugin.showPrivacyOptionsForm();
196
+
197
+
198
+
164
199
  }, false);
165
200
 
166
201
  </pre>
@@ -250,6 +285,62 @@ if (window.cordova.platformId === 'ios') {
250
285
  Rewarded_ID = 'ca-app-pub-3940256099942544/5224354917';
251
286
  Rewarded_Interstitial_ID = 'ca-app-pub-3940256099942544/5354046379';
252
287
  }
288
+
289
+
290
+ cordova.plugins.emiAdmobPlugin.initialize({
291
+ isUsingAdManagerRequest: true, // true = AdManagerAdRequest.Builder | false = AdRequest.Builder (Default true)
292
+ isResponseInfo: true, // Default false
293
+ isConsentDebug: true, // Default false
294
+ });
295
+
296
+
297
+ document.addEventListener('on.sdkInitialization', (data) => {
298
+ // JSON.stringify(data)
299
+ const sdkVersion = data.version;
300
+ // const adAdapter = data.adapters;
301
+ // const conStatus = data.consentStatus;
302
+ // const gdprApplie = data.gdprApplies;
303
+ // const purposeConsent = data.purposeConsents;
304
+ // const vendorConsents = data.vendorConsents;
305
+ // const conTCString = data.consentTCString;
306
+ // const additionalConsent = data.additionalConsent;
307
+ console.log("On Sdk Initialization version: " + sdkVersion);
308
+
309
+
310
+ cordova.plugins.emiAdmobPlugin.loadInterstitialAd({
311
+ adUnitId: "ca-app-pub-3940256099942544/1033173712",
312
+ autoShow: true
313
+ });
314
+
315
+ });
316
+
317
+
318
+ document.addEventListener('on.interstitial.loaded', () => {
319
+
320
+ console.log("on interstitial Ad loaded");
321
+
322
+ });
323
+
324
+ // all events that contain the keyword dismissed there is a block to load the ad after it is closed by the user.
325
+ // 'on.interstitial.dismissed' | 'on.rewardedInt.dismissed' | 'on.rewarded.dismissed'
326
+ document.addEventListener('on.interstitial.dismissed', () => {
327
+
328
+ console.log("on interstitial Ad dismissed");
329
+ console.log("you can load ads automatically after the ads are closed by users");
330
+ // loadInterstitialAd();
331
+
332
+ });
333
+
334
+ function loadInterstitialAd(){
335
+
336
+ cordova.plugins.emiAdmobPlugin.loadInterstitialAd({
337
+ adUnitId: "ca-app-pub-3940256099942544/1033173712",
338
+ autoShow: false
339
+ });
340
+
341
+ }
342
+
343
+
253
344
  </script>
254
345
  ```
255
346
 
@@ -260,17 +351,42 @@ if (window.cordova.platformId === 'ios') {
260
351
  <summary>Methods:</summary>
261
352
  <pre>
262
353
  // Support Platform: Android | IOS
263
- cordova.plugins.emiAdmobPlugin.loadAppOpenAd([config_AppOpenAd]);
264
- cordova.plugins.emiAdmobPlugin.showAppOpenAd();
354
+ cordova.plugins.emiAdmobPlugin.loadAppOpenAd({config});
355
+ cordova.plugins.emiAdmobPlugin.showAppOpenAd(); // default
356
+
357
+ // Advanced Show (Optional)
358
+ cordova.plugins.emiAdmobPlugin.showAppOpenAd(
359
+
360
+ (data) => {
361
+
362
+ console.log("Micros: " + data.micros);
363
+ console.log("Currency: " + data.currency);
364
+ console.log("Precision: " + data.precision);
365
+ console.log("AdUnitId: " + data.adUnitId};
366
+
367
+ },
368
+ (error) => {
369
+
370
+ console.error("Error: " + error);
371
+
372
+ });
373
+
374
+
265
375
  <br>
266
376
  </pre>
267
377
  <li>example:</li></ul>
268
378
  <pre>
379
+
380
+ WARNING options configuration was previously an array [], now v.1.4.9 or later must be an object{}
381
+ example
382
+ ```
383
+ previous example
384
+ [ adUnitId = App_Open_ID, autoShow = true ] // Deprecated
385
+ now
386
+ { adUnitId: App_Open_ID, autoShow: true }
269
387
 
270
- // WARNING config must be an array[] not an object{}
271
- // adUnitId = call Global Variable
272
-
273
- cordova.plugins.emiAdmobPlugin.loadAppOpenAd([ adUnitId = App_Open_ID, autoShow = true ]);
388
+ cordova.plugins.emiAdmobPlugin.loadAppOpenAd({ adUnitId: App_Open_ID, autoShow: true });
389
+ ```
274
390
  </pre>
275
391
  </details>
276
392
 
@@ -292,10 +408,11 @@ document.addEventListener('on.appOpenAd.loaded', () => {
292
408
  console.log("On App Open Ad loaded");
293
409
 
294
410
  });
411
+
295
412
  </pre>
296
413
  </details>
297
414
 
298
- - [FULL AppOpenAd basic:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/app_open_ads.html) -index.html
415
+ - [FULL AppOpenAd basic: Not yet updated](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/app_open_ads.html) -index.html
299
416
 
300
417
 
301
418
 
@@ -305,16 +422,17 @@ document.addEventListener('on.appOpenAd.loaded', () => {
305
422
  <details>
306
423
  <summary>Methods:</summary>
307
424
  <pre>
308
- cordova.plugins.emiAdmobPlugin.loadBannerAd([bannerConfig]);
309
- cordova.plugins.emiAdmobPlugin.showBannerAd();
310
- cordova.plugins.emiAdmobPlugin.hideBannerAd();
311
- cordova.plugins.emiAdmobPlugin.removeBannerAd();
425
+ cordova.plugins.emiAdmobPlugin.loadBannerAd({config});
426
+ cordova.plugins.emiAdmobPlugin.showBannerAd(); // default
427
+ cordova.plugins.emiAdmobPlugin.hideBannerAd(); // default
428
+ cordova.plugins.emiAdmobPlugin.removeBannerAd(); // default
312
429
  </pre>
313
430
  <li>example:</li></ul>
314
431
  <pre>
315
- // WARNING config must be an array[] not an object{}
316
- // adUnitId = call Global Variable
432
+ WARNING options configuration was previously an array [], now v.1.4.9 or later must be an object{}
317
433
 
434
+ // Deprecated
435
+ /*
318
436
  const bannerConfig = [
319
437
 
320
438
  adUnitId = Banner_ID,
@@ -323,11 +441,42 @@ const bannerConfig = [
323
441
  collapsible = "bottom", // (BETA) enable in globalSettings
324
442
  adaptive_Width = 320, // Ignored
325
443
  autoShow = true // boolean
326
-
327
444
  ]
445
+ */
446
+
447
+ // NEW
448
+
449
+ const bannerConfig = {
450
+
451
+ adUnitId: "ca-app-pub-3940256099942544/9214589741", //Banner_ID,
452
+ position: "bottom-center",
453
+ size: "responsive_adaptive", // autoResize: true (only responsive_adaptive)
454
+ collapsible: "bottom", // position: top | bottom (disable, empty string)
455
+ autoResize: true, // on.screen.rotated === orientation.portrait || on.screen.rotated === orientation.landscape
456
+ autoShow: true, // boolean
457
+
458
+ }
328
459
 
329
460
  cordova.plugins.emiAdmobPlugin.loadBannerAd(bannerConfig);
330
461
 
462
+
463
+ // Advanced Show (Optional)
464
+ cordova.plugins.emiAdmobPlugin.showBannerAd(
465
+
466
+ (data) => {
467
+
468
+ console.log("Micros: " + data.micros);
469
+ console.log("Currency: " + data.currency);
470
+ console.log("Precision: " + data.precision);
471
+ console.log("AdUnitId: " + data.adUnitId};
472
+
473
+ },
474
+ (error) => {
475
+
476
+ console.error("Error: " + error);
477
+
478
+ });
479
+
331
480
  </pre>
332
481
  </details>
333
482
 
@@ -347,16 +496,28 @@ bottom-right
347
496
  <details>
348
497
  <summary>Size type string</summary>
349
498
  <pre>
350
- ANCHORED
351
- IN_LINE
352
- FULL_WIDTH
353
- BANNER
354
- FLUID
355
- LARGE_BANNER
356
- MEDIUM_RECTANGLE
357
- FULL_BANNER
358
- LEADERBOARD
359
- adaptive_Width = number
499
+
500
+ responsive_adaptive
501
+ anchored_adaptive
502
+ full_width_adaptive
503
+ in_line_adaptive
504
+ banner
505
+ large_banner
506
+ medium_rectangle
507
+ full_banner
508
+ leaderboard
509
+ fluid
510
+
511
+ ANCHORED // Deprecated
512
+ IN_LINE // Deprecated
513
+ FULL_WIDTH // Deprecated
514
+ BANNER // Deprecated
515
+ FLUID // Deprecated
516
+ LARGE_BANNER // Deprecated
517
+ MEDIUM_RECTANGLE // Deprecated
518
+ FULL_BANNER // Deprecated
519
+ LEADERBOARD // Deprecated
520
+ adaptive_Width = number // Deprecated
360
521
  </pre>
361
522
  </details>
362
523
 
@@ -373,6 +534,8 @@ on.banner.open
373
534
  on.banner.revenue
374
535
  on.banner.remove
375
536
  on.banner.hide
537
+ // new
538
+ on.is.collapsible
376
539
  </pre>
377
540
  <li>example:</li></ul>
378
541
  <pre>
@@ -380,10 +543,17 @@ document.addEventListener('on.banner.load', () => {
380
543
 
381
544
  console.log("on banner load");
382
545
 
383
- });</pre>
546
+ });
547
+
548
+ document.addEventListener('on.is.collapsible', function(event) {
549
+ // bannerConfig collapsible: "bottom", // position: top | bottom (disable, empty string)
550
+ console.log("Collapsible Status: " + event.collapsible);
551
+
552
+ });
553
+ </pre>
384
554
  </details>
385
555
 
386
- [FULL Banner basic:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/banner_ads.html) index.html
556
+ [FULL Banner basic: Not yet updated](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/banner_ads.html) index.html
387
557
 
388
558
 
389
559
  ## Interstitial ADS
@@ -393,17 +563,42 @@ document.addEventListener('on.banner.load', () => {
393
563
  <summary>Methods:</summary>
394
564
  <pre>
395
565
  // Support Platform: Android | IOS
396
- cordova.plugins.emiAdmobPlugin.loadInterstitialAd([config_Interstitial]);
397
- cordova.plugins.emiAdmobPlugin.showInterstitialAd();
566
+ cordova.plugins.emiAdmobPlugin.loadInterstitialAd({config});
567
+ cordova.plugins.emiAdmobPlugin.showInterstitialAd(); // default
568
+
569
+ // Advanced Show (Optional)
570
+ cordova.plugins.emiAdmobPlugin.showInterstitialAd(
571
+
572
+ (data) => {
573
+
574
+ console.log("Micros: " + data.micros);
575
+ console.log("Currency: " + data.currency);
576
+ console.log("Precision: " + data.precision);
577
+ console.log("AdUnitId: " + data.adUnitId};
578
+
579
+ },
580
+ (error) => {
581
+
582
+ console.error("Error: " + error);
583
+
584
+ });
398
585
  <br>
399
586
  </pre>
400
587
  <li>example:</li></ul>
401
588
  <pre>
402
589
 
403
- // WARNING config must be an array[] not an object{}
404
- // adUnitId = call Global Variable
590
+ WARNING options configuration was previously an array [], now v.1.4.9 or later must be an object{}
591
+ example
592
+ ```
593
+ /*
594
+ previous example
595
+ [ adUnitId = Interstitial_ID, autoShow = true ] // Deprecated
596
+ New
597
+ { adUnitId: Interstitial_ID, autoShow: true }
598
+ */
599
+ cordova.plugins.emiAdmobPlugin.loadInterstitialAd({ adUnitId: "ca-app-pub-3940256099942544/1033173712", autoShow: true });
600
+ ```
405
601
 
406
- cordova.plugins.emiAdmobPlugin.loadInterstitialAd([ adUnitId = Interstitial_ID, autoShow = true ]);
407
602
  </pre>
408
603
  </details>
409
604
 
@@ -428,11 +623,23 @@ document.addEventListener('on.interstitial.loaded', () => {
428
623
  console.log("on interstitial Ad loaded");
429
624
 
430
625
  });
626
+
627
+ // all events that contain the keyword dismissed there is a block to load the ad after it is closed by the user.
628
+ // 'on.interstitial.dismissed' | 'on.rewardedInt.dismissed' | 'on.rewarded.dismissed'
629
+ document.addEventListener('on.interstitial.dismissed', () => {
630
+
631
+ console.log("on interstitial Ad dismissed");
632
+ console.log("you can load ads automatically after the ads are closed by users");
633
+ // loadInterstitialAd();
634
+
635
+ });
636
+
637
+
431
638
  </pre>
432
639
  </details>
433
640
 
434
641
 
435
- [FULL Interstitial basic:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/interstitial_ads.html) index.html
642
+ [FULL Interstitial basic: Not yet updated](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/interstitial_ads.html) index.html
436
643
 
437
644
 
438
645
 
@@ -445,17 +652,34 @@ document.addEventListener('on.interstitial.loaded', () => {
445
652
  <summary>Methods:</summary>
446
653
  <pre>
447
654
  // Support Platform: Android | IOS
448
- cordova.plugins.emiAdmobPlugin.loadRewardedInterstitialAd([config_rewardedInt]);
449
- cordova.plugins.emiAdmobPlugin.showRewardedInterstitialAd();
655
+ cordova.plugins.emiAdmobPlugin.loadRewardedInterstitialAd({config});
656
+ cordova.plugins.emiAdmobPlugin.showRewardedInterstitialAd(); // default
450
657
  <br>
451
658
  </pre>
452
659
  <li>example:</li></ul>
453
660
  <pre>
454
661
 
455
- // WARNING config must be an array[] not an object{}
456
- // adUnitId = call Global Variable
662
+ cordova.plugins.emiAdmobPlugin.loadRewardedInterstitialAd({ adUnitId: Rewarded_Interstitial_ID, autoShow: true });
457
663
 
458
- cordova.plugins.emiAdmobPlugin.loadRewardedInterstitialAd([ adUnitId = Rewarded_Interstitial_ID, autoShow = true ]);
664
+ // Advanced Show (Optional)
665
+ cordova.plugins.emiAdmobPlugin.showRewardedInterstitialAd(
666
+
667
+ (data) => {
668
+
669
+ console.log("Micros: " + data.micros);
670
+ console.log("Currency: " + data.currency);
671
+ console.log("Precision: " + data.precision);
672
+ console.log("AdUnitId: " + data.adUnitId};
673
+
674
+ },
675
+ (error) => {
676
+
677
+ console.error("Error: " + error);
678
+
679
+ });
680
+
681
+
682
+
459
683
  </pre>
460
684
  </details>
461
685
 
@@ -482,10 +706,22 @@ document.addEventListener('on.rewardedInt.loaded', () => {
482
706
  console.log("on rewarded Interstitial load");
483
707
 
484
708
  });
709
+
710
+ // all events that contain the keyword dismissed there is a block to load the ad after it is closed by the user.
711
+ // 'on.interstitial.dismissed' | 'on.rewardedInt.dismissed' | 'on.rewarded.dismissed'
712
+ document.addEventListener('on.rewardedInt.dismissed', () => {
713
+
714
+ console.log("on interstitial Ad dismissed");
715
+ console.log("you can load ads automatically after the ads are closed by users");
716
+ // loadRewardedInterstitialAd();
717
+
718
+ });
719
+
720
+
485
721
  </pre>
486
722
  </details>
487
723
 
488
- [FULL Rewarded Interstitial basic:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/rewarded_interstitial_ads.html) index.html
724
+ [FULL Rewarded Interstitial basic: Not yet updated](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/rewarded_interstitial_ads.html) index.html
489
725
 
490
726
 
491
727
 
@@ -497,15 +733,33 @@ document.addEventListener('on.rewardedInt.loaded', () => {
497
733
  <summary>Methods:</summary>
498
734
  <pre>
499
735
  // Support Platform: Android | IOS
500
- cordova.plugins.emiAdmobPlugin.loadRewardedAd([config_rewarded]);
501
- cordova.plugins.emiAdmobPlugin.showRewardedAd();
736
+ cordova.plugins.emiAdmobPlugin.loadRewardedAd({config});
737
+ cordova.plugins.emiAdmobPlugin.showRewardedAd(); // default
502
738
  <br>
503
739
  </pre>
504
740
  <li>example:</li></ul>
505
741
  <pre>
506
- // adUnitId = call Global Variable
507
742
 
508
- cordova.plugins.emiAdmobPlugin.loadRewardedAd([ adUnitId = Rewarded_ID, autoShow = true ]);
743
+ cordova.plugins.emiAdmobPlugin.loadRewardedAd({ adUnitId: Rewarded_ID, autoShow: true });
744
+
745
+ // Advanced Show (Optional)
746
+ cordova.plugins.emiAdmobPlugin.showRewardedAd(
747
+
748
+ (data) => {
749
+
750
+ console.log("Micros: " + data.micros);
751
+ console.log("Currency: " + data.currency);
752
+ console.log("Precision: " + data.precision);
753
+ console.log("AdUnitId: " + data.adUnitId};
754
+
755
+ },
756
+ (error) => {
757
+
758
+ console.error("Error: " + error);
759
+
760
+ });
761
+
762
+
509
763
  </pre>
510
764
  </details>
511
765
 
@@ -533,10 +787,22 @@ document.addEventListener('on.rewarded.loaded', () => {
533
787
  console.log("on rewarded Ad loaded");
534
788
 
535
789
  });
790
+
791
+ // all events that contain the keyword dismissed there is a block to load the ad after it is closed by the user.
792
+ // 'on.interstitial.dismissed' | 'on.rewardedInt.dismissed' | 'on.rewarded.dismissed'
793
+ document.addEventListener('on.rewarded.dismissed', () => {
794
+
795
+ console.log("on interstitial Ad dismissed");
796
+ console.log("you can load ads automatically after the ads are closed by users");
797
+ // loadRewardedAd();
798
+
799
+ });
800
+
801
+
536
802
  </pre>
537
803
  </details>
538
804
 
539
- [FULL Rewarded basic:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/rewarded_ads.html) index.html
805
+ [FULL Rewarded basic: Not yet updated](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/rewarded_ads.html) index.html
540
806
 
541
807
 
542
808
 
@@ -545,7 +811,16 @@ document.addEventListener('on.rewarded.loaded', () => {
545
811
 
546
812
 
547
813
 
814
+ ## GLOBAL EVENT Screen (Optional)
548
815
 
816
+ <details>
817
+ <summary>Event:</summary>
818
+ <pre>
819
+ on.screen.rotated
820
+ on.orientation.portrait
821
+ on.orientation.landscape
822
+ </pre>
823
+ </details>
549
824
 
550
825
 
551
826
 
@@ -565,7 +840,7 @@ document.addEventListener('on.rewarded.loaded', () => {
565
840
  - Interstitial Ads
566
841
  - Rewarded Ads
567
842
  - Rewarded interstitial Ads
568
- - [Consent](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/Advanced%20topics/consent.html)
843
+ - [Consent Not yet updated](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/Advanced%20topics/consent.html)
569
844
  - Mediation
570
845
  - impression-level-ad-revenue
571
846
  - GDPR IAB TFCv2.2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emi-indo-cordova-plugin-admob",
3
- "version": "1.4.7",
3
+ "version": "1.5.0",
4
4
  "description": "Cordova Plugin Admob Android IOS",
5
5
  "cordova": {
6
6
  "id": "emi-indo-cordova-plugin-admob",