emi-indo-cordova-plugin-admob 0.0.9 → 1.1.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/.github/ISSUE_TEMPLATE/bug_report.md +124 -0
- package/README.md +137 -347
- package/example/Advanced topics/auto_load_and_show.html +94 -0
- package/example/{consent.html → Advanced topics/consent.html } +51 -22
- package/example/Advanced topics/globalSettings.html +39 -0
- package/example/Advanced topics/targeting.html +78 -0
- package/example/app_open_ads.html +151 -0
- package/example/banner_ads.html +248 -0
- package/example/interstitial_ads.html +166 -0
- package/example/rewarded_ads.html +185 -0
- package/example/rewarded_interstitial_ads.html +184 -0
- package/package.json +1 -1
- package/plugin.xml +8 -5
- package/src/android/emiAdmobPlugin.java +1 -1
- package/www/emiAdmobPlugin.js +24 -16
- package/example/index.html +0 -296
package/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# emi-indo-cordova-plugin-admob
|
2
2
|
Cordova Plugin Admob Android and IOS
|
3
3
|
|
4
|
-
### Mobile Ads SDK (Android: 22.
|
4
|
+
### Mobile Ads SDK (Android: 22.2.0) [Release Notes:](https://developers.google.com/admob/android/rel-notes)
|
5
5
|
|
6
6
|
### Mobile Ads SDK (IOS: 10.3.0) [Release Notes:](https://developers.google.com/admob/ios/rel-notes)
|
7
7
|
|
@@ -10,13 +10,6 @@
|
|
10
10
|
-
|
11
11
|
|
12
12
|
|
13
|
-
> __Warning__
|
14
|
-
> Updating the Mobile Ads SDK version may cause some code to malfunction, as the latest version usually deprecates some older code, [scrrenshot](https://drive.google.com/file/d/1UKaEjdmGRXgdZ2DKfOne8BSq13IUY14_/view) Current plugin code SDK 22.0.0
|
15
|
-
|
16
|
-
> __Warning__
|
17
|
-
> If the cordova admob plugin using Mobile Ads SDK code version 20.6.0 is upgraded to Mobile Ads SDK version 22.0.0, some of the old plugin code will not work.
|
18
|
-
|
19
|
-
|
20
13
|
> __Note__
|
21
14
|
> - ## It's Not a fork, it's purely rewritten, clean of 3rd party code.
|
22
15
|
|
@@ -30,8 +23,19 @@
|
|
30
23
|
## 💰Sponsor this project
|
31
24
|
[](https://paypal.me/emiindo)
|
32
25
|
|
33
|
-
|
26
|
+
## [Check all release notes:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/releases/)
|
27
|
+
|
28
|
+
|
29
|
+
## Minimum Cordova Engines
|
30
|
+
- cordova version = 10.0.0
|
31
|
+
- cordova-android version = 11.0.0
|
32
|
+
- cordova-ios version = 6.0.0
|
34
33
|
|
34
|
+
## Features
|
35
|
+
|
36
|
+
- SDK initialize
|
37
|
+
- targeting
|
38
|
+
- globalSettings
|
35
39
|
- App Open Ads
|
36
40
|
- Banner Ads
|
37
41
|
- Interstitial Ads
|
@@ -44,6 +48,11 @@
|
|
44
48
|
- App Open Ads ( Finished )
|
45
49
|
- User Consent ( Finished ) [emi-indo-cordova-plugin-consent](https://github.com/EMI-INDO/emi-indo-cordova-plugin-consent)
|
46
50
|
- Mediation ( Finished )
|
51
|
+
- https://developers.google.com/admob/android/native/start
|
52
|
+
- https://developers.google.com/admob/android/impression-level-ad-revenue ( Finished ) v1.1.9
|
53
|
+
- https://developers.google.com/admob/android/ssv
|
54
|
+
|
55
|
+
|
47
56
|
|
48
57
|
|
49
58
|
## Installation
|
@@ -66,318 +75,31 @@ cordova plugin rm emi-indo-cordova-plugin-admob
|
|
66
75
|
cordova plugin add emi-indo-cordova-plugin-admob --variable APP_ID_ANDROID=ca-app-pub-3940256099942544~3347511713 --variable PLAY_SERVICES_VERSION="xxxx"
|
67
76
|
```
|
68
77
|
|
69
|
-
## Response Info
|
70
|
-
- Here is a sample output returned by responseInfo = true showing the debugging data returned for a loaded ad:
|
71
|
-
|
72
|
-
```sh
|
73
|
-
{
|
74
|
-
"Response ID": "COOllLGxlPoCFdAx4Aod-Q4A0g",
|
75
|
-
"Mediation Adapter Class Name": "com.google.ads.mediation.admob.AdMobAdapter",
|
76
|
-
"Adapter Responses": [
|
77
|
-
{
|
78
|
-
"Adapter": "com.google.ads.mediation.admob.AdMobAdapter",
|
79
|
-
"Latency": 328,
|
80
|
-
"Ad Source Name": "Reservation campaign",
|
81
|
-
"Ad Source ID": "7068401028668408324",
|
82
|
-
"Ad Source Instance Name": "[DO NOT EDIT] Publisher Test Interstitial",
|
83
|
-
"Ad Source Instance ID": "4665218928925097",
|
84
|
-
"Credentials": {},
|
85
|
-
"Ad Error": "null"
|
86
|
-
}
|
87
|
-
],
|
88
|
-
"Loaded Adapter Response": {
|
89
|
-
"Adapter": "com.google.ads.mediation.admob.AdMobAdapter",
|
90
|
-
"Latency": 328,
|
91
|
-
"Ad Source Name": "Reservation campaign",
|
92
|
-
"Ad Source ID": "7068401028668408324",
|
93
|
-
"Ad Source Instance Name": "[DO NOT EDIT] Publisher Test Interstitial",
|
94
|
-
"Ad Source Instance ID": "4665218928925097",
|
95
|
-
"Credentials": {},
|
96
|
-
"Ad Error": "null"
|
97
|
-
},
|
98
|
-
"Response Extras": {
|
99
|
-
"mediation_group_name": "Campaign"
|
100
|
-
}
|
101
|
-
}
|
102
|
-
```
|
103
|
-
|
104
|
-
|
105
|
-
## deviceready
|
106
|
-
|
107
|
-
[Example ](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/index.html) - index.html:
|
108
|
-
|
109
|
-
|
110
|
-
```sh
|
111
|
-
|
112
|
-
// Before loading ads, have your app initialize the Google Mobile Ads SDK by calling
|
113
|
-
// This needs to be done only once, ideally at app launch.
|
114
|
-
|
115
|
-
cordova.plugins.emiAdmobPlugin.initialize();
|
116
|
-
|
117
|
-
document.addEventListener('on.SdkInitializationComplete', () => {
|
118
|
-
|
119
|
-
alert("on Sdk Initialization Complete");
|
120
|
-
|
121
|
-
});
|
122
|
-
|
123
|
-
|
124
|
-
```
|
125
|
-
|
126
|
-
|
127
|
-
## App Open Ads
|
128
|
-
|
129
|
-
> __Note__
|
130
|
-
### Variable name and index (final) cannot be changed.
|
131
|
-
- appOpenAdUnitId | index 0
|
132
|
-
- npa | index 1
|
133
|
-
- responseInfo | index 2
|
134
|
-
|
135
|
-
```sh
|
136
|
-
// load App Open Ad
|
137
|
-
|
138
|
-
let loadAppOpenAd = () => {
|
139
|
-
cordova.plugins.emiAdmobPlugin.loadAppOpenAd(
|
140
|
-
appOpenAdUnitId = "ca-app-pub-3940256099942544/3419835294",
|
141
|
-
npa = "1", // String | 0 | 1
|
142
|
-
responseInfo = true, // boolean
|
143
|
-
|
144
|
-
(info) => { alert(info) },
|
145
|
-
(error) => { alert(error)
|
146
|
-
|
147
|
-
});
|
148
|
-
}
|
149
|
-
|
150
|
-
// call loadAppOpenAd();
|
151
|
-
|
152
|
-
// Show App Open Ad
|
153
|
-
|
154
|
-
let showAppOpenAd = () => {
|
155
|
-
cordova.plugins.emiAdmobPlugin.showAppOpenAd();
|
156
|
-
}
|
157
|
-
|
158
|
-
// call showAppOpenAd();
|
159
|
-
|
160
|
-
```
|
161
|
-
|
162
|
-
|
163
|
-
## Banner Ads
|
164
|
-
|
165
|
-
> __Note__
|
166
|
-
### Variable name and index (final) cannot be changed.
|
167
|
-
- bannerAdUnitId | index 0
|
168
|
-
- npa | index 1
|
169
|
-
- position | index 2
|
170
|
-
- size | index 3
|
171
|
-
- adaptiveWidth | index 4
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
```sh
|
176
|
-
/// setting banner size:
|
177
|
-
/*
|
178
|
-
BANNER
|
179
|
-
FLUID
|
180
|
-
LARGE_BANNER
|
181
|
-
MEDIUM_RECTANGLE
|
182
|
-
FULL_BANNER
|
183
|
-
LEADERBOARD
|
184
|
-
(Smart Banners = DEPRECATED)
|
185
|
-
Inline_adaptive
|
186
|
-
Anchored_adaptive
|
187
|
-
default: Anchored_FULL_WIDTH
|
188
|
-
|
189
|
-
adaptiveWidth = 320 // number (only adaptive banner)
|
190
|
-
|
191
|
-
*/
|
192
|
-
/// setting banner position:
|
193
|
-
/*
|
194
|
-
top-right
|
195
|
-
top-center
|
196
|
-
left
|
197
|
-
center
|
198
|
-
right
|
199
|
-
bottom-center
|
200
|
-
bottom-right
|
201
|
-
default: "bottom-left"
|
202
|
-
*/
|
203
|
-
|
204
|
-
|
205
|
-
// Banner Adaptive
|
206
|
-
|
207
|
-
let showBannerAdaptive = () => {
|
208
|
-
cordova.plugins.emiAdmobPlugin.showBannerAd(
|
209
|
-
bannerAdUnitId = "ca-app-pub-3940256099942544/6300978111",
|
210
|
-
npa = "1", // String | 0 | 1
|
211
|
-
position = "bottom-center",
|
212
|
-
size = "Anchored_FULL_WIDTH", // | Inline_adaptive | Anchored_adaptive
|
213
|
-
adaptiveWidth = 320,
|
214
|
-
responseInfo = true, // boolean (debugging)
|
215
|
-
|
216
|
-
(info) => { alert(info) },
|
217
|
-
(error) => { alert(error)
|
218
|
-
|
219
|
-
});
|
220
|
-
}
|
221
|
-
|
222
|
-
// call showBannerAdaptive();
|
223
|
-
|
224
|
-
// not Adaptive banner
|
225
|
-
|
226
|
-
let showBannerNotAdaptive = () => {
|
227
|
-
cordova.plugins.emiAdmobPlugin.showBannerAd(
|
228
|
-
bannerAdUnitId = "ca-app-pub-3940256099942544/6300978111",
|
229
|
-
npa = "1", // String | 0 | 1
|
230
|
-
position = "bottom-center",
|
231
|
-
size = "FLUID",
|
232
|
-
responseInfo = true, // boolean (debugging)
|
233
|
-
|
234
|
-
(info) => { alert(info) },
|
235
|
-
(error) => { alert(error)
|
236
78
|
|
237
|
-
});
|
238
|
-
}
|
239
|
-
|
240
|
-
// call showBannerNotAdaptive();
|
241
|
-
|
242
|
-
// Remove Banner
|
243
|
-
|
244
|
-
let removeBannerAd = () => {
|
245
|
-
cordova.plugins.emiAdmobPlugin.removeBannerAd();
|
246
|
-
}
|
247
|
-
|
248
|
-
// call removeBannerAd();
|
249
|
-
|
250
|
-
```
|
251
|
-
[Banner ads event](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob#-banner-ads-) - callback:
|
252
|
-
|
253
|
-
|
254
|
-
## Interstitial Ads
|
255
|
-
|
256
|
-
> __Note__
|
257
|
-
### Variable name and index (final) cannot be changed.
|
258
|
-
- interstitialAdAdUnitId | index 0
|
259
|
-
- npa | index 1
|
260
|
-
- responseInfo | index 2
|
261
79
|
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
let loadInterstitialAd = () => {
|
266
|
-
cordova.plugins.emiAdmobPlugin.loadInterstitialAd(
|
267
|
-
interstitialAdAdUnitId = "ca-app-pub-3940256099942544/1033173712",
|
268
|
-
npa = "1", // String | 0 | 1
|
269
|
-
responseInfo = true, // boolean (debugging)
|
270
|
-
|
271
|
-
(info) => { alert(info) },
|
272
|
-
(error) => { alert(error)
|
273
|
-
|
274
|
-
});
|
275
|
-
}
|
276
|
-
|
277
|
-
// call loadInterstitialAd();
|
278
|
-
|
279
|
-
// Show Interstitial Ad
|
280
|
-
|
281
|
-
let showInterstitialAd = () => {
|
282
|
-
cordova.plugins.emiAdmobPlugin.showInterstitialAd();
|
283
|
-
}
|
284
|
-
|
285
|
-
// call showInterstitialAd();
|
286
|
-
|
287
|
-
```
|
288
|
-
|
289
|
-
[Interstitial ads event](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob#-interstitial-ads-) - callback:
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
## Rewarded Ads
|
294
|
-
|
295
|
-
> __Note__
|
296
|
-
### Variable name and index (final) cannot be changed.
|
297
|
-
- rewardedAdAdUnitId | index 0
|
298
|
-
- npa | index 1
|
299
|
-
- responseInfo | index 2
|
300
|
-
|
301
|
-
```sh
|
302
|
-
|
303
|
-
// Load Rewarded Ad
|
304
|
-
|
305
|
-
let loadRewardedAd = () => {
|
306
|
-
cordova.plugins.emiAdmobPlugin.loadRewardedAd(
|
307
|
-
rewardedAdAdUnitId = "ca-app-pub-3940256099942544/5224354917",
|
308
|
-
npa = "1", // String | 0 | 1
|
309
|
-
responseInfo = true, // boolean (debugging)
|
310
|
-
|
311
|
-
(info) => { alert(info) },
|
312
|
-
(error) => { alert(error)
|
313
|
-
|
314
|
-
});
|
315
|
-
}
|
316
|
-
|
317
|
-
// call loadRewardedAd();
|
318
|
-
|
319
|
-
// Show Rewarded Ad
|
320
|
-
|
321
|
-
let showRewardedAd = () => {
|
322
|
-
cordova.plugins.emiAdmobPlugin.showRewardedAd();
|
323
|
-
}
|
324
|
-
|
325
|
-
// call showRewardedAd();
|
326
|
-
|
327
|
-
|
328
|
-
```
|
329
|
-
|
330
|
-
[Rewarded ads event](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob#-rewarded-ads-) - callback:
|
331
|
-
|
332
|
-
|
333
|
-
## Rewarded interstitial Ads
|
334
|
-
|
335
|
-
> __Note__
|
336
|
-
### Variable name and index (final) cannot be changed.
|
337
|
-
- rewardedInterstitialAdUnitId | index 0
|
338
|
-
- npa | index 1
|
339
|
-
- responseInfo | index 2
|
340
|
-
|
341
|
-
```sh
|
342
|
-
|
343
|
-
// load Rewarded Interstitial Ad
|
344
|
-
|
345
|
-
let loadRewardedInterstitialAd = () => {
|
346
|
-
cordova.plugins.emiAdmobPlugin.loadRewardedInterstitialAd(
|
347
|
-
rewardedInterstitialAdUnitId = "ca-app-pub-3940256099942544/5354046379",
|
348
|
-
npa = "1", // String | 0 | 1
|
349
|
-
responseInfo = true, // boolean (debugging)
|
350
|
-
|
351
|
-
(info) => { alert(info) },
|
352
|
-
(error) => { alert(error)
|
353
|
-
|
354
|
-
});
|
355
|
-
}
|
356
|
-
|
357
|
-
// call loadRewardedInterstitialAd();
|
358
|
-
|
359
|
-
// Show Rewarded Interstitial Ad
|
360
|
-
|
361
|
-
const showRewardedInterstitialAd = () => {
|
362
|
-
cordova.plugins.emiAdmobPlugin.showRewardedInterstitialAd();
|
363
|
-
}
|
364
|
-
|
365
|
-
// cal showRewardedInterstitialAd();
|
80
|
+
> __Note__
|
81
|
+
> - # Plugin version @1.1.9
|
366
82
|
|
83
|
+
[FULL Example ](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/) - index.html:
|
367
84
|
|
368
|
-
|
85
|
+
### [ App Open Ad code example: ](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/app_open_ads.html)
|
86
|
+
### [ Banner Ad code example: ](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/banner_ads.html)
|
87
|
+
### [ Interstitial Ad code example: ](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/interstitial_ads.html)
|
88
|
+
### [ Rewarded interstitial Ad code example: ](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/rewarded_interstitial_ads.html)
|
89
|
+
### [ Rewarded Ad code example: ](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/rewarded_ads.html)
|
369
90
|
|
370
|
-
[
|
91
|
+
### [ Advanced topics: ](https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/tree/main/example/Advanced%20topics)
|
371
92
|
|
93
|
+
|
372
94
|
|
373
95
|
|
374
96
|
# Event | callback:
|
375
|
-
### event code
|
97
|
+
### Example event code
|
376
98
|
|
377
99
|
```sh
|
378
|
-
document.addEventListener('on.
|
100
|
+
document.addEventListener('on.appOpenAd.loaded', () => {
|
379
101
|
|
380
|
-
alert("
|
102
|
+
alert("On App Open Ad loaded");
|
381
103
|
|
382
104
|
});
|
383
105
|
|
@@ -387,21 +109,22 @@ alert("on.banner Ad Loaded");
|
|
387
109
|
### (final) cannot be changed.
|
388
110
|
|
389
111
|
## ( SDK )
|
390
|
-
- on.
|
391
|
-
|
112
|
+
- on.sdkInitialization
|
392
113
|
|
393
114
|
## ( App Open Ads )
|
394
115
|
|
395
116
|
### Event Load
|
396
117
|
|
397
|
-
- on.
|
398
|
-
- on.
|
118
|
+
- on.appOpenAd.loaded
|
119
|
+
- on.appOpenAd.failed.loaded
|
399
120
|
|
400
121
|
### Event Show
|
401
122
|
|
402
|
-
- on.
|
403
|
-
- on.
|
404
|
-
- on.
|
123
|
+
- on.appOpenAd.dismissed
|
124
|
+
- on.appOpenAd.failed.show
|
125
|
+
- on.appOpenAd.show
|
126
|
+
### NEW
|
127
|
+
- on.appOpenAd.revenue
|
405
128
|
|
406
129
|
|
407
130
|
## ( Banner Ads )
|
@@ -430,20 +153,26 @@ alert("on.banner Ad Loaded");
|
|
430
153
|
- LEADERBOARD
|
431
154
|
- adaptiveWidth = number
|
432
155
|
- Smart Banners = DEPRECATED
|
433
|
-
- default:
|
156
|
+
- default: Adaptive_FULL_WIDTH
|
434
157
|
|
158
|
+
Note: Smart Banners = DEPRECATED ( Replaced by Adaptive_FULL_WIDTH )
|
435
159
|
|
436
160
|
|
161
|
+
### Event Load
|
437
162
|
|
438
|
-
|
163
|
+
- on.banner.load
|
164
|
+
- on.banner.failed.load
|
439
165
|
|
440
|
-
|
441
|
-
- on.bannerAdClosed
|
442
|
-
- on.bannerAdFailedToLoad
|
443
|
-
- on.bannerAdImpression
|
444
|
-
- on.bannerAdLoaded
|
445
|
-
- on.bannerAdOpened
|
166
|
+
### Event Show
|
446
167
|
|
168
|
+
- on.banner.click
|
169
|
+
- on.banner.close
|
170
|
+
- on.banner.impression
|
171
|
+
- on.banner.open
|
172
|
+
### NEW
|
173
|
+
- on.banner.revenue
|
174
|
+
- on.banner.remove
|
175
|
+
|
447
176
|
|
448
177
|
|
449
178
|
|
@@ -451,16 +180,19 @@ alert("on.banner Ad Loaded");
|
|
451
180
|
|
452
181
|
### Event Load
|
453
182
|
|
454
|
-
- on.
|
455
|
-
- on.
|
183
|
+
- on.interstitial.loaded
|
184
|
+
- on.interstitial.failed.load
|
456
185
|
|
457
186
|
### Event Show
|
458
187
|
|
459
|
-
- on.
|
460
|
-
- on.
|
461
|
-
- on.
|
462
|
-
- on.
|
463
|
-
- on.
|
188
|
+
- on.interstitial.click
|
189
|
+
- on.interstitial.dismissed
|
190
|
+
- on.interstitial.failed.show
|
191
|
+
- on.interstitial.impression
|
192
|
+
- on.interstitial.show
|
193
|
+
### NEW
|
194
|
+
- on.interstitial.revenue
|
195
|
+
|
464
196
|
|
465
197
|
|
466
198
|
|
@@ -469,18 +201,21 @@ alert("on.banner Ad Loaded");
|
|
469
201
|
|
470
202
|
### Event Load
|
471
203
|
|
472
|
-
- on.
|
473
|
-
- on.
|
204
|
+
- on.rewarded.loaded
|
205
|
+
- on.rewarded.failed.load
|
474
206
|
|
475
207
|
|
476
208
|
### Event Show
|
477
209
|
|
478
|
-
- on.
|
479
|
-
- on.
|
480
|
-
- on.
|
481
|
-
- on.
|
482
|
-
- on.
|
483
|
-
|
210
|
+
- on.rewarded.click
|
211
|
+
- on.rewarded.dismissed
|
212
|
+
- on.rewarded.failed.show
|
213
|
+
- on.rewarded.impression
|
214
|
+
- on.rewarded.show
|
215
|
+
### NEW
|
216
|
+
- on.rewarded.revenue
|
217
|
+
- on.rewarded.ad.skip
|
218
|
+
- on.reward.userEarnedReward
|
484
219
|
|
485
220
|
|
486
221
|
|
@@ -488,22 +223,70 @@ alert("on.banner Ad Loaded");
|
|
488
223
|
|
489
224
|
### Event Load
|
490
225
|
|
491
|
-
- on.
|
492
|
-
- on.
|
226
|
+
- on.rewardedInt.loaded
|
227
|
+
- on.rewardedInt.failed.load
|
493
228
|
|
494
229
|
|
495
230
|
### Event Show
|
496
231
|
|
497
|
-
- on.
|
498
|
-
- on.
|
499
|
-
- on.
|
500
|
-
- on.
|
501
|
-
- on.
|
502
|
-
|
232
|
+
- on.rewardedInt.click
|
233
|
+
- on.rewardedInt.dismissed
|
234
|
+
- on.rewardedInt.failed.show
|
235
|
+
- on.rewardedInt.impression
|
236
|
+
- on.rewardedInt.showed
|
237
|
+
### NEW
|
238
|
+
- on.rewardedInt.revenue
|
239
|
+
- on.rewardedInt.ad.skip
|
240
|
+
- on.rewardedInt.userEarnedReward
|
503
241
|
|
504
242
|
|
505
243
|
|
506
244
|
|
245
|
+
## Response Info
|
246
|
+
- Here is a sample output returned by responseInfo = true showing the debugging data returned for a loaded ad:
|
247
|
+
|
248
|
+
```sh
|
249
|
+
{
|
250
|
+
"Response ID": "COOllLGxlPoCFdAx4Aod-Q4A0g",
|
251
|
+
"Mediation Adapter Class Name": "com.google.ads.mediation.admob.AdMobAdapter",
|
252
|
+
"Adapter Responses": [
|
253
|
+
{
|
254
|
+
"Adapter": "com.google.ads.mediation.admob.AdMobAdapter",
|
255
|
+
"Latency": 328,
|
256
|
+
"Ad Source Name": "Reservation campaign",
|
257
|
+
"Ad Source ID": "7068401028668408324",
|
258
|
+
"Ad Source Instance Name": "[DO NOT EDIT] Publisher Test Interstitial",
|
259
|
+
"Ad Source Instance ID": "4665218928925097",
|
260
|
+
"Credentials": {},
|
261
|
+
"Ad Error": "null"
|
262
|
+
}
|
263
|
+
],
|
264
|
+
"Loaded Adapter Response": {
|
265
|
+
"Adapter": "com.google.ads.mediation.admob.AdMobAdapter",
|
266
|
+
"Latency": 328,
|
267
|
+
"Ad Source Name": "Reservation campaign",
|
268
|
+
"Ad Source ID": "7068401028668408324",
|
269
|
+
"Ad Source Instance Name": "[DO NOT EDIT] Publisher Test Interstitial",
|
270
|
+
"Ad Source Instance ID": "4665218928925097",
|
271
|
+
"Credentials": {},
|
272
|
+
"Ad Error": "null"
|
273
|
+
},
|
274
|
+
"Response Extras": {
|
275
|
+
"mediation_group_name": "Campaign"
|
276
|
+
}
|
277
|
+
}
|
278
|
+
|
279
|
+
|
280
|
+
Bundle[{max_ad_content_rating=G,
|
281
|
+
npa=1,
|
282
|
+
is_designed_for_families=0,
|
283
|
+
under_age_of_consent=0]
|
284
|
+
|
285
|
+
|
286
|
+
```
|
287
|
+
|
288
|
+
|
289
|
+
|
507
290
|
|
508
291
|
# Admob Mediation
|
509
292
|
<img src="https://user-images.githubusercontent.com/78555833/229587307-91a7e380-aa2d-4140-a62d-fa8e6a8dd153.png" width="500">
|
@@ -653,4 +436,11 @@ emi-indo-cordova-plugin-admob@0.0.5
|
|
653
436
|
- ### emi-indo-cordova-plugin-open-ai
|
654
437
|
|
655
438
|
[Cordova Plugin Open Ai:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-open-ai) - Open AI:
|
439
|
+
|
440
|
+
|
441
|
+
## New Firebase Analytics
|
442
|
+
|
443
|
+
- ### emi-indo-cordova-plugin-fanalytics
|
444
|
+
|
445
|
+
[Cordova Plugin Firebase Analytics:](https://github.com/EMI-INDO/emi-indo-cordova-plugin-fanalytics) - Firebase Analytics:
|
656
446
|
|
@@ -0,0 +1,94 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<script type="text/javascript" src="cordova.js"></script>
|
4
|
+
</head>
|
5
|
+
<body>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
|
9
|
+
|
10
|
+
// For example automatically load Interstitial Ad
|
11
|
+
|
12
|
+
// Load Interstitial Ad
|
13
|
+
|
14
|
+
let loadInterstitialAd = () => {
|
15
|
+
cordova.plugins.emiAdmobPlugin.loadInterstitialAd(
|
16
|
+
AdUnitId = "ca-app-pub-3940256099942544/1033173712",
|
17
|
+
npa = "1", // String | 0 | 1
|
18
|
+
responseInfo = true, // boolean
|
19
|
+
|
20
|
+
// Optional
|
21
|
+
(info) => { alert(info) },
|
22
|
+
(error) => { alert(error)
|
23
|
+
|
24
|
+
});
|
25
|
+
|
26
|
+
// call loadInterstitialAd();
|
27
|
+
}
|
28
|
+
|
29
|
+
// Show Interstitial Ad
|
30
|
+
|
31
|
+
let showInterstitialAd = () => {
|
32
|
+
cordova.plugins.emiAdmobPlugin.showInterstitialAd();
|
33
|
+
|
34
|
+
// call showInterstitialAd();
|
35
|
+
}
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
// deviceready
|
41
|
+
|
42
|
+
document.addEventListener("deviceready", function(){
|
43
|
+
|
44
|
+
// Before loading ads, have your app initialize the Google Mobile Ads SDK by calling
|
45
|
+
// This needs to be done only once, ideally at app launch.
|
46
|
+
|
47
|
+
cordova.plugins.emiAdmobPlugin.initialize();
|
48
|
+
|
49
|
+
|
50
|
+
// auto load call loadInterstitialAd();
|
51
|
+
|
52
|
+
loadInterstitialAd();
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
// Interstitial EVENT
|
58
|
+
|
59
|
+
/*
|
60
|
+
on.interstitial.loaded
|
61
|
+
on.interstitial.failed.load
|
62
|
+
on.interstitial.click
|
63
|
+
on.interstitial.dismissed
|
64
|
+
on.interstitial.failed.show
|
65
|
+
on.interstitial.impression
|
66
|
+
on.interstitial.show
|
67
|
+
on.interstitial.revenue
|
68
|
+
*/
|
69
|
+
|
70
|
+
document.addEventListener('on.interstitial.loaded', () => {
|
71
|
+
|
72
|
+
// auto show call showInterstitialAd();
|
73
|
+
|
74
|
+
showInterstitialAd();
|
75
|
+
|
76
|
+
console.log("on Interstitial Ad Loaded");
|
77
|
+
|
78
|
+
});
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
}, false);
|
84
|
+
|
85
|
+
</script>
|
86
|
+
|
87
|
+
|
88
|
+
<p> <button onclick="loadInterstitialAd();">Load Interstitial Ad</button></p>
|
89
|
+
<p> <button onclick="showInterstitialAd();">Show Interstitial Ad</button></p>
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
</body>
|
94
|
+
</html>
|