cordova-plugin-admob-nextgen 2.0.1 → 2.0.2

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.
package/README.md CHANGED
@@ -115,7 +115,7 @@ This plugin is regularly updated to support the latest standards.
115
115
 
116
116
  | Component | Platform | Version | Release Notes |
117
117
  | :--- | :--- | :--- | :--- |
118
- | **GMA Next-Gen SDK** | Android | **1.3.0** | [View Notes](https://developers.google.com/admob/android/next-gen/rel-notes) |
118
+ | **GMA Next-Gen SDK** | Android | **1.4.0** | [View Notes](https://developers.google.com/admob/android/next-gen/rel-notes) |
119
119
  | **UMP SDK** | Android | **4.0.0** | [View Notes](https://developers.google.com/admob/android/privacy/release-notes) |
120
120
  | **Mobile Ads SDK** | iOS | **13.3.0** | [View Notes](https://developers.google.com/admob/ios/rel-notes) |
121
121
  | **UMP SDK** | iOS | **3.1.0** | [View Notes](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/privacy/download) |
@@ -158,7 +158,7 @@ function run() {
158
158
  admob = {
159
159
  APP_ID_ANDROID: appIdAndroid ? appIdAndroid[1] : "ca-app-pub-3940256099942544~3347511713",
160
160
  APP_ID_IOS: appIdIos ? appIdIos[1] : "ca-app-pub-3940256099942544~1458002511",
161
- NEXT_GEN_SDK_VERSION: sdk ? sdk[1] : "1.2.1",
161
+ NEXT_GEN_SDK_VERSION: sdk ? sdk[1] : "1.4.0",
162
162
  UMP_VERSION: ump ? ump[1] : "4.0.0"
163
163
  };
164
164
  }
@@ -167,7 +167,7 @@ function run() {
167
167
  injectExclusionRules();
168
168
  if (admob?.NEXT_GEN_SDK_VERSION || admob?.UMP_VERSION) {
169
169
  updateGradleDependencies(
170
- admob.NEXT_GEN_SDK_VERSION || "1.2.1",
170
+ admob.NEXT_GEN_SDK_VERSION || "1.4.0",
171
171
  admob.UMP_VERSION || "4.0.0"
172
172
  );
173
173
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-admob-nextgen",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Google Mobile Ads Next Gen SDK for Cordova. High performance and modular architecture. ",
5
5
  "cordova": {
6
6
  "id": "cordova-plugin-admob-nextgen",
package/plugin.xml CHANGED
@@ -1,6 +1,6 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
2
  <plugin id="cordova-plugin-admob-nextgen"
3
- version="2.0.1"
3
+ version="2.0.2"
4
4
  xmlns="http://apache.org/cordova/ns/plugins/1.0"
5
5
  xmlns:android="http://schemas.android.com/apk/res/android">
6
6
 
@@ -26,6 +26,7 @@
26
26
 
27
27
  <config-file parent="/*" target="AndroidManifest.xml">
28
28
  <uses-permission android:name="android.permission.INTERNET" />
29
+ <uses-permission android:name="com.google.android.gms.permission.AD_ID" />
29
30
  </config-file>
30
31
 
31
32
  <!-- hooks: Prevent conflicts with legacy SDKs when using mediation -->
@@ -53,7 +54,7 @@
53
54
 
54
55
  </platform>
55
56
 
56
- <preference name="NEXT_GEN_SDK_VERSION" default="1.3.0" />
57
+ <preference name="NEXT_GEN_SDK_VERSION" default="1.4.0" />
57
58
  <preference name="UMP_VERSION" default="4.0.0" />
58
59
  <!-- Sample AdMob app ID: ca-app-pub-3940256099942544~3347511713 -->
59
60
  <preference name="APP_ID_ANDROID" default="ca-app-pub-3940256099942544~3347511713" />
@@ -513,6 +513,20 @@ public class BannerPreloadExecutor {
513
513
  webViewView.setLayoutParams(params);
514
514
  webViewView.requestLayout();
515
515
 
516
+ } else if (isCordova15) {
517
+ webViewView.setTranslationY(0);
518
+ if (!isBannerVisible || isOverlapping) {
519
+ params.setMargins(0, systemSafeTop, 0, systemSafeBottom);
520
+ } else {
521
+ if ("top".equalsIgnoreCase(currentPosition)) {
522
+ params.setMargins(0, systemSafeTop + lastAdHeight, 0, systemSafeBottom);
523
+ } else {
524
+ params.setMargins(0, systemSafeTop, 0, systemSafeBottom + lastAdHeight);
525
+ }
526
+ }
527
+ webViewView.setLayoutParams(params);
528
+ webViewView.requestLayout();
529
+
516
530
  } else {
517
531
 
518
532
  if ("top".equalsIgnoreCase(currentPosition)) {