cordova-plugin-admob-nextgen 1.5.9 → 1.7.9
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
|
@@ -113,7 +113,7 @@ This plugin is regularly updated to support the latest standards.
|
|
|
113
113
|
|
|
114
114
|
| Component | Platform | Version | Release Notes |
|
|
115
115
|
| :--- | :--- | :--- | :--- |
|
|
116
|
-
| **GMA Next-Gen SDK** | Android | **1.
|
|
116
|
+
| **GMA Next-Gen SDK** | Android | **1.2.0** | [View Notes](https://developers.google.com/admob/android/next-gen/rel-notes) |
|
|
117
117
|
| **UMP SDK** | Android | **4.0.0** | [View Notes](https://developers.google.com/admob/android/privacy/release-notes) |
|
|
118
118
|
| **Mobile Ads SDK** | iOS | **13.3.0** | [View Notes](https://developers.google.com/admob/ios/rel-notes) |
|
|
119
119
|
| **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.0
|
|
161
|
+
NEXT_GEN_SDK_VERSION: sdk ? sdk[1] : "1.2.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.0
|
|
170
|
+
admob.NEXT_GEN_SDK_VERSION || "1.2.0",
|
|
171
171
|
admob.UMP_VERSION || "4.0.0"
|
|
172
172
|
);
|
|
173
173
|
}
|
package/package.json
CHANGED
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="1.
|
|
3
|
+
version="1.7.9"
|
|
4
4
|
xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
|
5
5
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
6
6
|
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
|
|
54
54
|
</platform>
|
|
55
55
|
|
|
56
|
-
<preference name="NEXT_GEN_SDK_VERSION" default="1.
|
|
56
|
+
<preference name="NEXT_GEN_SDK_VERSION" default="1.2.0" />
|
|
57
57
|
<preference name="UMP_VERSION" default="4.0.0" />
|
|
58
58
|
<!-- Sample AdMob app ID: ca-app-pub-3940256099942544~3347511713 -->
|
|
59
59
|
<preference name="APP_ID_ANDROID" default="ca-app-pub-3940256099942544~3347511713" />
|
|
@@ -80,6 +80,9 @@ public class InterstitialExecutor {
|
|
|
80
80
|
|
|
81
81
|
if (interstitialAd != null) {
|
|
82
82
|
|
|
83
|
+
if (requestCallback != null) {
|
|
84
|
+
requestCallback.success("Ad already loaded and ready");
|
|
85
|
+
}
|
|
83
86
|
fireEvent("on.interstitial.loaded", null);
|
|
84
87
|
return;
|
|
85
88
|
}
|
|
@@ -117,7 +120,6 @@ public class InterstitialExecutor {
|
|
|
117
120
|
@Override
|
|
118
121
|
public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
|
|
119
122
|
isLoading = false;
|
|
120
|
-
interstitialAd = null;
|
|
121
123
|
|
|
122
124
|
try {
|
|
123
125
|
JSONObject errData = new JSONObject();
|
|
@@ -67,6 +67,15 @@ public class RewardedInterstitialExecutor {
|
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
if (mRewardedInterstitialAd != null) {
|
|
71
|
+
|
|
72
|
+
fireEvent("on.rewardedInter.loaded", null);
|
|
73
|
+
if (callbackContext != null) {
|
|
74
|
+
callbackContext.success("Ad already loaded");
|
|
75
|
+
}
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
70
79
|
if ((currentTime - lastLoadTime) < minLoadInterval) {
|
|
71
80
|
|
|
72
81
|
if (callbackContext != null) callbackContext.error("Request too fast. Please wait " + minLoadInterval + " ms to prevent invalid traffic.");
|
|
@@ -110,8 +119,6 @@ public class RewardedInterstitialExecutor {
|
|
|
110
119
|
public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
|
|
111
120
|
isLoading = false;
|
|
112
121
|
|
|
113
|
-
mRewardedInterstitialAd = null;
|
|
114
|
-
|
|
115
122
|
try {
|
|
116
123
|
JSONObject err = new JSONObject();
|
|
117
124
|
err.put("code", loadAdError.getCode());
|
|
@@ -156,12 +163,13 @@ public class RewardedInterstitialExecutor {
|
|
|
156
163
|
@Override
|
|
157
164
|
public void onAdDismissedFullScreenContent() {
|
|
158
165
|
|
|
166
|
+
mRewardedInterstitialAd = null;
|
|
167
|
+
|
|
159
168
|
if (!isRewardEarned) {
|
|
160
169
|
fireEvent("on.rewardedInter.canceled", null);
|
|
161
170
|
}
|
|
162
171
|
|
|
163
172
|
fireEvent("on.rewardedInter.dismissed", null);
|
|
164
|
-
mRewardedInterstitialAd = null;
|
|
165
173
|
}
|
|
166
174
|
|
|
167
175
|
@Override
|