@capacitor-community/admob 6.2.0-1 → 7.0.0-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.
- package/CapacitorCommunityAdmob.podspec +1 -1
- package/Package.swift +2 -2
- package/README.md +26 -840
- package/android/build.gradle +11 -11
- package/android/src/main/java/com/getcapacitor/community/admob/banner/BannerExecutor.java +81 -91
- package/android/src/main/java/com/getcapacitor/community/admob/consent/AdConsentExecutor.java +16 -20
- package/android/src/main/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutor.java +17 -21
- package/android/src/main/java/com/getcapacitor/community/admob/rewarded/AdRewardExecutor.java +19 -23
- package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/AdRewardInterstitialExecutor.java +23 -27
- package/dist/docs.json +94 -2563
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +1 -1
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/package.json +17 -17
package/android/build.gradle
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
ext {
|
|
2
2
|
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
|
|
4
4
|
androidxCoordinatorLayoutVersion = project.hasProperty('androidxCoordinatorLayoutVersion') ? rootProject.ext.androidxCoordinatorLayoutVersion : '1.2.0'
|
|
5
|
-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1
|
|
6
|
-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.
|
|
5
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
|
|
6
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
|
|
7
7
|
playServicesAdsVersion = project.hasProperty('playServicesAdsVersion') ? rootProject.ext.playServicesAdsVersion : '23.0.0'
|
|
8
8
|
androidxCoreKTXVersion = project.hasProperty('androidxCoreKTXVersion') ? rootProject.ext.androidxCoreKTXVersion : '1.13.0'
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
buildscript {
|
|
12
|
-
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.
|
|
12
|
+
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.25'
|
|
13
13
|
repositories {
|
|
14
14
|
google()
|
|
15
15
|
mavenCentral()
|
|
16
16
|
}
|
|
17
17
|
dependencies {
|
|
18
|
-
classpath 'com.android.tools.build:gradle:8.2
|
|
18
|
+
classpath 'com.android.tools.build:gradle:8.7.2'
|
|
19
19
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -25,10 +25,10 @@ apply plugin: 'kotlin-android'
|
|
|
25
25
|
|
|
26
26
|
android {
|
|
27
27
|
namespace "com.getcapacitor.community.admob.admob"
|
|
28
|
-
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
28
|
+
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
|
|
29
29
|
defaultConfig {
|
|
30
|
-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion :
|
|
31
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
30
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
|
|
31
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
|
|
32
32
|
versionCode 1
|
|
33
33
|
versionName "1.0"
|
|
34
34
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -43,11 +43,11 @@ android {
|
|
|
43
43
|
abortOnError false
|
|
44
44
|
}
|
|
45
45
|
compileOptions {
|
|
46
|
-
sourceCompatibility JavaVersion.
|
|
47
|
-
targetCompatibility JavaVersion.
|
|
46
|
+
sourceCompatibility JavaVersion.VERSION_21
|
|
47
|
+
targetCompatibility JavaVersion.VERSION_21
|
|
48
48
|
}
|
|
49
49
|
kotlinOptions {
|
|
50
|
-
jvmTarget = JavaVersion.
|
|
50
|
+
jvmTarget = JavaVersion.VERSION_21
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -140,20 +140,18 @@ public class BannerExecutor extends Executor {
|
|
|
140
140
|
try {
|
|
141
141
|
activitySupplier
|
|
142
142
|
.get()
|
|
143
|
-
.runOnUiThread(
|
|
144
|
-
()
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
mAdView.pause();
|
|
143
|
+
.runOnUiThread(() -> {
|
|
144
|
+
if (mAdViewLayout != null) {
|
|
145
|
+
mAdViewLayout.setVisibility(View.GONE);
|
|
146
|
+
mAdView.pause();
|
|
148
147
|
|
|
149
|
-
|
|
148
|
+
final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(0, 0);
|
|
150
149
|
|
|
151
|
-
|
|
150
|
+
notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo);
|
|
152
151
|
|
|
153
|
-
|
|
154
|
-
}
|
|
152
|
+
call.resolve();
|
|
155
153
|
}
|
|
156
|
-
);
|
|
154
|
+
});
|
|
157
155
|
} catch (Exception ex) {
|
|
158
156
|
call.reject(ex.getLocalizedMessage(), ex);
|
|
159
157
|
}
|
|
@@ -163,19 +161,17 @@ public class BannerExecutor extends Executor {
|
|
|
163
161
|
try {
|
|
164
162
|
activitySupplier
|
|
165
163
|
.get()
|
|
166
|
-
.runOnUiThread(
|
|
167
|
-
()
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
mAdView.resume();
|
|
164
|
+
.runOnUiThread(() -> {
|
|
165
|
+
if (mAdViewLayout != null && mAdView != null) {
|
|
166
|
+
mAdViewLayout.setVisibility(View.VISIBLE);
|
|
167
|
+
mAdView.resume();
|
|
171
168
|
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(mAdView);
|
|
170
|
+
notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo);
|
|
174
171
|
|
|
175
|
-
|
|
176
|
-
}
|
|
172
|
+
Log.d(logTag, "Banner AD Resumed");
|
|
177
173
|
}
|
|
178
|
-
);
|
|
174
|
+
});
|
|
179
175
|
|
|
180
176
|
call.resolve();
|
|
181
177
|
} catch (Exception ex) {
|
|
@@ -188,19 +184,17 @@ public class BannerExecutor extends Executor {
|
|
|
188
184
|
if (mAdView != null) {
|
|
189
185
|
activitySupplier
|
|
190
186
|
.get()
|
|
191
|
-
.runOnUiThread(
|
|
192
|
-
()
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo);
|
|
201
|
-
}
|
|
187
|
+
.runOnUiThread(() -> {
|
|
188
|
+
if (mAdView != null) {
|
|
189
|
+
mViewGroup.removeView(mAdViewLayout);
|
|
190
|
+
mAdViewLayout.removeView(mAdView);
|
|
191
|
+
mAdView.destroy();
|
|
192
|
+
mAdView = null;
|
|
193
|
+
Log.d(logTag, "Banner AD Removed");
|
|
194
|
+
final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(0, 0);
|
|
195
|
+
notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo);
|
|
202
196
|
}
|
|
203
|
-
);
|
|
197
|
+
});
|
|
204
198
|
}
|
|
205
199
|
|
|
206
200
|
call.resolve();
|
|
@@ -212,12 +206,10 @@ public class BannerExecutor extends Executor {
|
|
|
212
206
|
private void updateExistingAdView(AdOptions adOptions) {
|
|
213
207
|
activitySupplier
|
|
214
208
|
.get()
|
|
215
|
-
.runOnUiThread(
|
|
216
|
-
()
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
);
|
|
209
|
+
.runOnUiThread(() -> {
|
|
210
|
+
final AdRequest adRequest = RequestHelper.createRequest(adOptions);
|
|
211
|
+
mAdView.loadAd(adRequest);
|
|
212
|
+
});
|
|
221
213
|
}
|
|
222
214
|
|
|
223
215
|
/**
|
|
@@ -228,67 +220,65 @@ public class BannerExecutor extends Executor {
|
|
|
228
220
|
// Run AdMob In Main UI Thread
|
|
229
221
|
activitySupplier
|
|
230
222
|
.get()
|
|
231
|
-
.runOnUiThread(
|
|
232
|
-
()
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}
|
|
223
|
+
.runOnUiThread(() -> {
|
|
224
|
+
final AdRequest adRequest = RequestHelper.createRequest(adOptions);
|
|
225
|
+
// Assign the correct id needed
|
|
226
|
+
AdViewIdHelper.assignIdToAdView(mAdView, adOptions, adRequest, logTag, contextSupplier.get());
|
|
227
|
+
// Add the AdView to the view hierarchy.
|
|
228
|
+
mAdViewLayout.addView(mAdView);
|
|
229
|
+
// Start loading the ad.
|
|
230
|
+
mAdView.loadAd(adRequest);
|
|
231
|
+
mAdView.setAdListener(
|
|
232
|
+
new AdListener() {
|
|
233
|
+
@Override
|
|
234
|
+
public void onAdLoaded() {
|
|
235
|
+
final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(mAdView);
|
|
236
|
+
|
|
237
|
+
notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo);
|
|
238
|
+
notifyListeners(BannerAdPluginEvents.Loaded.getWebEventName(), emptyObject);
|
|
239
|
+
super.onAdLoaded();
|
|
240
|
+
}
|
|
250
241
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
242
|
+
@Override
|
|
243
|
+
public void onAdFailedToLoad(@NonNull LoadAdError adError) {
|
|
244
|
+
if (mAdView != null) {
|
|
245
|
+
mViewGroup.removeView(mAdViewLayout);
|
|
246
|
+
mAdViewLayout.removeView(mAdView);
|
|
247
|
+
mAdView.destroy();
|
|
248
|
+
mAdView = null;
|
|
249
|
+
}
|
|
259
250
|
|
|
260
|
-
|
|
261
|
-
|
|
251
|
+
final BannerAdSizeInfo sizeInfo = new BannerAdSizeInfo(0, 0);
|
|
252
|
+
notifyListeners(BannerAdPluginEvents.SizeChanged.getWebEventName(), sizeInfo);
|
|
262
253
|
|
|
263
|
-
|
|
264
|
-
|
|
254
|
+
final AdMobPluginError adMobPluginError = new AdMobPluginError(adError);
|
|
255
|
+
notifyListeners(BannerAdPluginEvents.FailedToLoad.getWebEventName(), adMobPluginError);
|
|
265
256
|
|
|
266
|
-
|
|
267
|
-
|
|
257
|
+
super.onAdFailedToLoad(adError);
|
|
258
|
+
}
|
|
268
259
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
260
|
+
@Override
|
|
261
|
+
public void onAdOpened() {
|
|
262
|
+
notifyListeners(BannerAdPluginEvents.Opened.getWebEventName(), emptyObject);
|
|
263
|
+
super.onAdOpened();
|
|
264
|
+
}
|
|
274
265
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
266
|
+
@Override
|
|
267
|
+
public void onAdClosed() {
|
|
268
|
+
notifyListeners(BannerAdPluginEvents.Closed.getWebEventName(), emptyObject);
|
|
269
|
+
super.onAdClosed();
|
|
270
|
+
}
|
|
280
271
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
272
|
+
@Override
|
|
273
|
+
public void onAdImpression() {
|
|
274
|
+
notifyListeners(BannerAdPluginEvents.AdImpression.getWebEventName(), emptyObject);
|
|
275
|
+
super.onAdImpression();
|
|
286
276
|
}
|
|
287
|
-
|
|
277
|
+
}
|
|
278
|
+
);
|
|
288
279
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
);
|
|
280
|
+
// Add AdViewLayout top of the WebView
|
|
281
|
+
mViewGroup.addView(mAdViewLayout);
|
|
282
|
+
});
|
|
293
283
|
}
|
|
294
284
|
}
|
package/android/src/main/java/com/getcapacitor/community/admob/consent/AdConsentExecutor.java
CHANGED
|
@@ -90,26 +90,22 @@ public class AdConsentExecutor extends Executor {
|
|
|
90
90
|
ensureConsentInfo();
|
|
91
91
|
activitySupplier
|
|
92
92
|
.get()
|
|
93
|
-
.runOnUiThread(
|
|
94
|
-
(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
consentForm ->
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
),
|
|
111
|
-
formError -> call.reject("Error when show consent form", formError.getMessage())
|
|
112
|
-
)
|
|
93
|
+
.runOnUiThread(() ->
|
|
94
|
+
UserMessagingPlatform.loadConsentForm(
|
|
95
|
+
contextSupplier.get(),
|
|
96
|
+
consentForm ->
|
|
97
|
+
consentForm.show(activitySupplier.get(), formError -> {
|
|
98
|
+
if (formError != null) {
|
|
99
|
+
call.reject("Error when show consent form", formError.getMessage());
|
|
100
|
+
} else {
|
|
101
|
+
JSObject consentFormInfo = new JSObject();
|
|
102
|
+
consentFormInfo.put("status", getConsentStatusString(consentInformation.getConsentStatus()));
|
|
103
|
+
|
|
104
|
+
call.resolve(consentFormInfo);
|
|
105
|
+
}
|
|
106
|
+
}),
|
|
107
|
+
formError -> call.reject("Error when show consent form", formError.getMessage())
|
|
108
|
+
)
|
|
113
109
|
);
|
|
114
110
|
} catch (Exception ex) {
|
|
115
111
|
call.reject(ex.getLocalizedMessage(), ex);
|
|
@@ -38,18 +38,16 @@ public class AdInterstitialExecutor extends Executor {
|
|
|
38
38
|
try {
|
|
39
39
|
activitySupplier
|
|
40
40
|
.get()
|
|
41
|
-
.runOnUiThread(
|
|
42
|
-
()
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
);
|
|
41
|
+
.runOnUiThread(() -> {
|
|
42
|
+
final AdRequest adRequest = RequestHelper.createRequest(adOptions);
|
|
43
|
+
final String id = AdViewIdHelper.getFinalAdId(adOptions, adRequest, logTag, contextSupplier.get());
|
|
44
|
+
InterstitialAd.load(
|
|
45
|
+
activitySupplier.get(),
|
|
46
|
+
id,
|
|
47
|
+
adRequest,
|
|
48
|
+
adCallbackAndListeners.getInterstitialAdLoadCallback(call, notifyListenersFunction)
|
|
49
|
+
);
|
|
50
|
+
});
|
|
53
51
|
} catch (Exception ex) {
|
|
54
52
|
call.reject(ex.getLocalizedMessage(), ex);
|
|
55
53
|
}
|
|
@@ -66,15 +64,13 @@ public class AdInterstitialExecutor extends Executor {
|
|
|
66
64
|
|
|
67
65
|
activitySupplier
|
|
68
66
|
.get()
|
|
69
|
-
.runOnUiThread(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
call.reject(ex.getLocalizedMessage(), ex);
|
|
76
|
-
}
|
|
67
|
+
.runOnUiThread(() -> {
|
|
68
|
+
try {
|
|
69
|
+
interstitialAd.show(activitySupplier.get());
|
|
70
|
+
call.resolve();
|
|
71
|
+
} catch (Exception ex) {
|
|
72
|
+
call.reject(ex.getLocalizedMessage(), ex);
|
|
77
73
|
}
|
|
78
|
-
);
|
|
74
|
+
});
|
|
79
75
|
}
|
|
80
76
|
}
|
package/android/src/main/java/com/getcapacitor/community/admob/rewarded/AdRewardExecutor.java
CHANGED
|
@@ -34,22 +34,20 @@ public class AdRewardExecutor extends Executor {
|
|
|
34
34
|
|
|
35
35
|
activitySupplier
|
|
36
36
|
.get()
|
|
37
|
-
.runOnUiThread(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
call.reject(ex.getLocalizedMessage(), ex);
|
|
50
|
-
}
|
|
37
|
+
.runOnUiThread(() -> {
|
|
38
|
+
try {
|
|
39
|
+
final AdRequest adRequest = RequestHelper.createRequest(adOptions);
|
|
40
|
+
final String id = AdViewIdHelper.getFinalAdId(adOptions, adRequest, logTag, contextSupplier.get());
|
|
41
|
+
RewardedAd.load(
|
|
42
|
+
contextSupplier.get(),
|
|
43
|
+
id,
|
|
44
|
+
adRequest,
|
|
45
|
+
RewardedAdCallbackAndListeners.INSTANCE.getRewardedAdLoadCallback(call, notifyListenersFunction, adOptions)
|
|
46
|
+
);
|
|
47
|
+
} catch (Exception ex) {
|
|
48
|
+
call.reject(ex.getLocalizedMessage(), ex);
|
|
51
49
|
}
|
|
52
|
-
);
|
|
50
|
+
});
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
@PluginMethod
|
|
@@ -65,14 +63,12 @@ public class AdRewardExecutor extends Executor {
|
|
|
65
63
|
try {
|
|
66
64
|
activitySupplier
|
|
67
65
|
.get()
|
|
68
|
-
.runOnUiThread(
|
|
69
|
-
(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
);
|
|
66
|
+
.runOnUiThread(() -> {
|
|
67
|
+
mRewardedAd.show(
|
|
68
|
+
activitySupplier.get(),
|
|
69
|
+
RewardedAdCallbackAndListeners.INSTANCE.getOnUserEarnedRewardListener(call, notifyListenersFunction)
|
|
70
|
+
);
|
|
71
|
+
});
|
|
76
72
|
} catch (Exception ex) {
|
|
77
73
|
call.reject(ex.getLocalizedMessage(), ex);
|
|
78
74
|
}
|
|
@@ -34,26 +34,24 @@ public class AdRewardInterstitialExecutor extends Executor {
|
|
|
34
34
|
|
|
35
35
|
activitySupplier
|
|
36
36
|
.get()
|
|
37
|
-
.runOnUiThread(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
call.reject(ex.getLocalizedMessage(), ex);
|
|
54
|
-
}
|
|
37
|
+
.runOnUiThread(() -> {
|
|
38
|
+
try {
|
|
39
|
+
final AdRequest adRequest = RequestHelper.createRequest(adOptions);
|
|
40
|
+
final String id = AdViewIdHelper.getFinalAdId(adOptions, adRequest, logTag, contextSupplier.get());
|
|
41
|
+
RewardedInterstitialAd.load(
|
|
42
|
+
contextSupplier.get(),
|
|
43
|
+
id,
|
|
44
|
+
adRequest,
|
|
45
|
+
RewardedInterstitialAdCallbackAndListeners.INSTANCE.getRewardedAdLoadCallback(
|
|
46
|
+
call,
|
|
47
|
+
notifyListenersFunction,
|
|
48
|
+
adOptions
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
} catch (Exception ex) {
|
|
52
|
+
call.reject(ex.getLocalizedMessage(), ex);
|
|
55
53
|
}
|
|
56
|
-
);
|
|
54
|
+
});
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
@PluginMethod
|
|
@@ -69,14 +67,12 @@ public class AdRewardInterstitialExecutor extends Executor {
|
|
|
69
67
|
try {
|
|
70
68
|
activitySupplier
|
|
71
69
|
.get()
|
|
72
|
-
.runOnUiThread(
|
|
73
|
-
(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
);
|
|
70
|
+
.runOnUiThread(() -> {
|
|
71
|
+
mRewardedInterstitialAd.show(
|
|
72
|
+
activitySupplier.get(),
|
|
73
|
+
RewardedInterstitialAdCallbackAndListeners.INSTANCE.getOnUserEarnedRewardListener(call, notifyListenersFunction)
|
|
74
|
+
);
|
|
75
|
+
});
|
|
80
76
|
} catch (Exception ex) {
|
|
81
77
|
call.reject(ex.getLocalizedMessage(), ex);
|
|
82
78
|
}
|