@capacitor-community/admob 5.3.1 → 6.1.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/README.md +292 -87
- package/android/build.gradle +6 -6
- package/android/src/main/java/com/getcapacitor/community/admob/AdMob.java +17 -0
- package/android/src/main/java/com/getcapacitor/community/admob/models/AdOptions.java +10 -0
- package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/AdRewardInterstitialExecutor.java +84 -0
- package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/RewardInterstitialAdPluginEvents.kt +12 -0
- package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/RewardedInterstitialAdCallbackAndListeners.kt +50 -0
- package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/models/SsvInfo.kt +20 -0
- package/dist/docs.json +374 -34
- package/dist/esm/banner/banner-definitions.interface.d.ts +18 -18
- package/dist/esm/definitions.d.ts +2 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interstitial/interstitial-definitions.interface.d.ts +5 -5
- package/dist/esm/private/validate-all-events-implemented.type.d.ts +1 -1
- package/dist/esm/reward/reward-definitions.interface.d.ts +12 -12
- package/dist/esm/reward-interstitial/index.d.ts +4 -0
- package/dist/esm/reward-interstitial/index.js +5 -0
- package/dist/esm/reward-interstitial/index.js.map +1 -0
- package/dist/esm/reward-interstitial/reward-interstitial-ad-options.interface.d.ts +25 -0
- package/dist/esm/reward-interstitial/reward-interstitial-ad-options.interface.js +2 -0
- package/dist/esm/reward-interstitial/reward-interstitial-ad-options.interface.js.map +1 -0
- package/dist/esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.d.ts +32 -0
- package/dist/esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.js +35 -0
- package/dist/esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.js.map +1 -0
- package/dist/esm/reward-interstitial/reward-interstitial-definitions.interface.d.ts +30 -0
- package/dist/esm/reward-interstitial/reward-interstitial-definitions.interface.js +2 -0
- package/dist/esm/reward-interstitial/reward-interstitial-definitions.interface.js.map +1 -0
- package/dist/esm/reward-interstitial/reward-interstitial-item.interface.d.ts +14 -0
- package/dist/esm/reward-interstitial/reward-interstitial-item.interface.js +2 -0
- package/dist/esm/reward-interstitial/reward-interstitial-item.interface.js.map +1 -0
- package/dist/esm/web.d.ts +2 -2
- package/dist/esm/web.js +12 -9
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +47 -9
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +47 -9
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/Banner/BannerExecutor.swift +11 -23
- package/ios/Plugin/Consent/ConsentExecutor.swift +1 -1
- package/ios/Plugin/Interstitial/AdInterstitialExecutor.swift +4 -4
- package/ios/Plugin/Plugin.m +2 -0
- package/ios/Plugin/Plugin.swift +28 -6
- package/ios/Plugin/Rewarded/AdRewardExecutor.swift +4 -4
- package/ios/Plugin/RewardedInterstitial/AdRewardInterstitialExecutor.swift +86 -0
- package/ios/Plugin/RewardedInterstitial/RewardInterstitialAdPluginEvents.swift +8 -0
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
|
-
<img src="https://img.shields.io/maintenance/yes/
|
|
9
|
+
<img src="https://img.shields.io/maintenance/yes/2024?style=flat-square" />
|
|
10
10
|
<!-- <a href="https://github.com/capacitor-community/example/actions?query=workflow%3A%22CI%22"><img src="https://img.shields.io/github/workflow/status/capacitor-community/example/CI?style=flat-square" /></a> -->
|
|
11
11
|
<a href="https://www.npmjs.com/package/@capacitor-community/admob"><img src="https://img.shields.io/npm/l/@capacitor-community/admob?style=flat-square" /></a>
|
|
12
12
|
<br>
|
|
@@ -16,14 +16,15 @@
|
|
|
16
16
|
|
|
17
17
|
## Maintainers
|
|
18
18
|
|
|
19
|
-
| Maintainer | GitHub
|
|
20
|
-
| ------------------- |
|
|
21
|
-
| Masahiko Sakakibara | [rdlabo](https://github.com/rdlabo)
|
|
22
|
-
| Saninn Salas Diaz
|
|
19
|
+
| Maintainer | GitHub | Social | Sponsoring Company |
|
|
20
|
+
| ------------------- | ------------------------------------------------ | ----------------------------------------------- | ---------------------------------------------- |
|
|
21
|
+
| Masahiko Sakakibara | [rdlabo](https://github.com/rdlabo) | [@rdlabo](https://twitter.com/rdlabo) | RELATION DESIGN LABO, GENERAL INC. ASSOCIATION |
|
|
22
|
+
| Saninn Salas Diaz | [Saninn Salas Diaz](https://github.com/distante) | [@SaninnSalas](https://twitter.com/SaninnSalas) | |
|
|
23
23
|
|
|
24
24
|
Maintenance Status: Actively Maintained
|
|
25
25
|
|
|
26
26
|
## Contributors ✨
|
|
27
|
+
|
|
27
28
|
<a href="https://github.com/capacitor-community/admob/graphs/contributors">
|
|
28
29
|
<img src="https://contrib.rocks/image?repo=capacitor-community/admob" />
|
|
29
30
|
</a>
|
|
@@ -42,6 +43,7 @@ Made with [contributors-img](https://contrib.rocks).
|
|
|
42
43
|
| **Android** |  |  |  |
|
|
43
44
|
|
|
44
45
|
## Installation
|
|
46
|
+
|
|
45
47
|
If you use capacitor 5:
|
|
46
48
|
|
|
47
49
|
```
|
|
@@ -118,9 +120,14 @@ Don't forget to replace `[APP_ID]` by your AdMob application Id.
|
|
|
118
120
|
import { AdMob } from '@capacitor-community/admob';
|
|
119
121
|
|
|
120
122
|
export async function initialize(): Promise<void> {
|
|
121
|
-
|
|
123
|
+
await AdMob.initialize();
|
|
122
124
|
|
|
123
|
-
|
|
125
|
+
const [trackingInfo, consentInfo] = await Promise.all([
|
|
126
|
+
AdMob.trackingAuthorizationStatus(),
|
|
127
|
+
AdMob.requestConsentInfo(),
|
|
128
|
+
]);
|
|
129
|
+
|
|
130
|
+
if (trackingInfo.status === 'notDetermined') {
|
|
124
131
|
/**
|
|
125
132
|
* If you want to explain TrackingAuthorization before showing the iOS dialog,
|
|
126
133
|
* you can show the modal here.
|
|
@@ -132,16 +139,21 @@ export async function initialize(): Promise<void> {
|
|
|
132
139
|
* await modal.onDidDismiss(); // Wait for close modal
|
|
133
140
|
**/
|
|
134
141
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
142
|
+
await AdMob.requestTrackingAuthorization();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const authorizationStatus = await AdMob.trackingAuthorizationStatus();
|
|
146
|
+
if (
|
|
147
|
+
authorizationStatus.status === 'authorized' &&
|
|
148
|
+
consentInfo.isConsentFormAvailable &&
|
|
149
|
+
consentInfo.status === AdmobConsentStatus.REQUIRED
|
|
150
|
+
) {
|
|
151
|
+
await AdMob.showConsentForm();
|
|
140
152
|
}
|
|
141
153
|
}
|
|
142
154
|
```
|
|
143
155
|
|
|
144
|
-
Send
|
|
156
|
+
Send an array of device Ids in `testingDevices` to use production like ads on your specified devices -> https://developers.google.com/admob/android/test-ads#enable_test_devices
|
|
145
157
|
|
|
146
158
|
### User Message Platform (UMP)
|
|
147
159
|
|
|
@@ -170,10 +182,10 @@ async showConsent() {
|
|
|
170
182
|
If you testing on real device, you have to set `debugGeography` and add your device ID to `testDeviceIdentifiers`. You can find your device ID with logcat (Android) or XCode (iOS).
|
|
171
183
|
|
|
172
184
|
```ts
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
185
|
+
const consentInfo = await AdMob.requestConsentInfo({
|
|
186
|
+
debugGeography: AdmobConsentDebugGeography.EEA,
|
|
187
|
+
testDeviceIdentifiers: ['YOUR_DEVICE_ID'],
|
|
188
|
+
});
|
|
177
189
|
```
|
|
178
190
|
|
|
179
191
|
**Note**: When testing, if you choose not consent (Manage -> Confirm Choices). The ads may not load/show. Even on testing enviroment. This is normal. It will work on Production so don't worry.
|
|
@@ -183,38 +195,53 @@ If you testing on real device, you have to set `debugGeography` and add your dev
|
|
|
183
195
|
1. AdMob.initialize
|
|
184
196
|
2. AdMob.requestConsentInfo
|
|
185
197
|
3. AdMob.showConsentForm (If consent form required )
|
|
186
|
-
3/ AdMob.showBanner
|
|
198
|
+
3/ AdMob.showBanner
|
|
187
199
|
|
|
188
200
|
### Show Banner
|
|
189
201
|
|
|
190
202
|
```ts
|
|
191
|
-
import {
|
|
203
|
+
import {
|
|
204
|
+
AdMob,
|
|
205
|
+
BannerAdOptions,
|
|
206
|
+
BannerAdSize,
|
|
207
|
+
BannerAdPosition,
|
|
208
|
+
BannerAdPluginEvents,
|
|
209
|
+
AdMobBannerSize,
|
|
210
|
+
} from '@capacitor-community/admob';
|
|
192
211
|
|
|
193
212
|
export async function banner(): Promise<void> {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
213
|
+
AdMob.addListener(BannerAdPluginEvents.Loaded, () => {
|
|
214
|
+
// Subscribe Banner Event Listener
|
|
215
|
+
});
|
|
197
216
|
|
|
198
|
-
|
|
217
|
+
AdMob.addListener(
|
|
218
|
+
BannerAdPluginEvents.SizeChanged,
|
|
219
|
+
(size: AdMobBannerSize) => {
|
|
199
220
|
// Subscribe Change Banner Size
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
221
|
+
},
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
const options: BannerAdOptions = {
|
|
225
|
+
adId: 'YOUR ADID',
|
|
226
|
+
adSize: BannerAdSize.BANNER,
|
|
227
|
+
position: BannerAdPosition.BOTTOM_CENTER,
|
|
228
|
+
margin: 0,
|
|
229
|
+
// isTesting: true
|
|
230
|
+
// npa: true
|
|
231
|
+
};
|
|
232
|
+
AdMob.showBanner(options);
|
|
211
233
|
}
|
|
212
234
|
```
|
|
213
235
|
|
|
214
236
|
### Show Interstitial
|
|
215
237
|
|
|
216
238
|
```ts
|
|
217
|
-
import {
|
|
239
|
+
import {
|
|
240
|
+
AdMob,
|
|
241
|
+
AdOptions,
|
|
242
|
+
AdLoadInfo,
|
|
243
|
+
InterstitialAdPluginEvents,
|
|
244
|
+
} from '@capacitor-community/admob';
|
|
218
245
|
|
|
219
246
|
export async function interstitial(): Promise<void> {
|
|
220
247
|
AdMob.addListener(InterstitialAdPluginEvents.Loaded, (info: AdLoadInfo) => {
|
|
@@ -234,17 +261,26 @@ export async function interstitial(): Promise<void> {
|
|
|
234
261
|
### Show RewardVideo
|
|
235
262
|
|
|
236
263
|
```ts
|
|
237
|
-
import {
|
|
264
|
+
import {
|
|
265
|
+
AdMob,
|
|
266
|
+
RewardAdOptions,
|
|
267
|
+
AdLoadInfo,
|
|
268
|
+
RewardAdPluginEvents,
|
|
269
|
+
AdMobRewardItem,
|
|
270
|
+
} from '@capacitor-community/admob';
|
|
238
271
|
|
|
239
272
|
export async function rewardVideo(): Promise<void> {
|
|
240
273
|
AdMob.addListener(RewardAdPluginEvents.Loaded, (info: AdLoadInfo) => {
|
|
241
274
|
// Subscribe prepared rewardVideo
|
|
242
275
|
});
|
|
243
276
|
|
|
244
|
-
AdMob.addListener(
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
277
|
+
AdMob.addListener(
|
|
278
|
+
RewardAdPluginEvents.Rewarded,
|
|
279
|
+
(rewardItem: AdMobRewardItem) => {
|
|
280
|
+
// Subscribe user rewarded
|
|
281
|
+
console.log(rewardItem);
|
|
282
|
+
},
|
|
283
|
+
);
|
|
248
284
|
|
|
249
285
|
const options: RewardAdOptions = {
|
|
250
286
|
adId: 'YOUR ADID',
|
|
@@ -261,27 +297,31 @@ export async function rewardVideo(): Promise<void> {
|
|
|
261
297
|
```
|
|
262
298
|
|
|
263
299
|
## Server-side Verification Notice
|
|
300
|
+
|
|
264
301
|
SSV callbacks are only fired on Production Adverts, therefore test Ads will not fire off your SSV callback.
|
|
265
302
|
|
|
266
303
|
For E2E tests or just for validating the data in your `RewardAdOptions` work as expected, you can add a custom GET
|
|
267
304
|
request to your mock endpoint after the `RewardAdPluginEvents.Rewarded` similar to this:
|
|
305
|
+
|
|
268
306
|
```ts
|
|
269
307
|
AdMob.addListener(RewardAdPluginEvents.Rewarded, async () => {
|
|
270
308
|
// ...
|
|
271
309
|
if (ENVIRONMENT_IS_DEVELOPMENT) {
|
|
272
310
|
try {
|
|
273
|
-
const url =
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
311
|
+
const url =
|
|
312
|
+
`https://your-staging-ssv-endpoint` +
|
|
313
|
+
new URLSearchParams({
|
|
314
|
+
ad_network: 'TEST',
|
|
315
|
+
ad_unit: 'TEST',
|
|
316
|
+
custom_data: customData, // <-- passed CustomData
|
|
317
|
+
reward_amount: 'TEST',
|
|
318
|
+
reward_item: 'TEST',
|
|
319
|
+
timestamp: 'TEST',
|
|
320
|
+
transaction_id: 'TEST',
|
|
321
|
+
user_id: userId, // <-- Passed UserID
|
|
322
|
+
signature: 'TEST',
|
|
323
|
+
key_id: 'TEST',
|
|
324
|
+
});
|
|
285
325
|
await fetch(url);
|
|
286
326
|
} catch (err) {
|
|
287
327
|
console.error(err);
|
|
@@ -291,8 +331,8 @@ AdMob.addListener(RewardAdPluginEvents.Rewarded, async () => {
|
|
|
291
331
|
});
|
|
292
332
|
```
|
|
293
333
|
|
|
294
|
-
|
|
295
334
|
## Index
|
|
335
|
+
|
|
296
336
|
<docgen-index>
|
|
297
337
|
|
|
298
338
|
* [`initialize(...)`](#initialize)
|
|
@@ -328,6 +368,14 @@ AdMob.addListener(RewardAdPluginEvents.Rewarded, async () => {
|
|
|
328
368
|
* [`addListener(RewardAdPluginEvents.Dismissed, ...)`](#addlistenerrewardadplugineventsdismissed-)
|
|
329
369
|
* [`addListener(RewardAdPluginEvents.FailedToShow, ...)`](#addlistenerrewardadplugineventsfailedtoshow-)
|
|
330
370
|
* [`addListener(RewardAdPluginEvents.Showed, ...)`](#addlistenerrewardadplugineventsshowed-)
|
|
371
|
+
* [`prepareRewardInterstitialAd(...)`](#preparerewardinterstitialad)
|
|
372
|
+
* [`showRewardInterstitialAd()`](#showrewardinterstitialad)
|
|
373
|
+
* [`addListener(RewardInterstitialAdPluginEvents.FailedToLoad, ...)`](#addlistenerrewardinterstitialadplugineventsfailedtoload-)
|
|
374
|
+
* [`addListener(RewardInterstitialAdPluginEvents.Loaded, ...)`](#addlistenerrewardinterstitialadplugineventsloaded-)
|
|
375
|
+
* [`addListener(RewardInterstitialAdPluginEvents.Rewarded, ...)`](#addlistenerrewardinterstitialadplugineventsrewarded-)
|
|
376
|
+
* [`addListener(RewardInterstitialAdPluginEvents.Dismissed, ...)`](#addlistenerrewardinterstitialadplugineventsdismissed-)
|
|
377
|
+
* [`addListener(RewardInterstitialAdPluginEvents.FailedToShow, ...)`](#addlistenerrewardinterstitialadplugineventsfailedtoshow-)
|
|
378
|
+
* [`addListener(RewardInterstitialAdPluginEvents.Showed, ...)`](#addlistenerrewardinterstitialadplugineventsshowed-)
|
|
331
379
|
* [Interfaces](#interfaces)
|
|
332
380
|
* [Type Aliases](#type-aliases)
|
|
333
381
|
* [Enums](#enums)
|
|
@@ -335,6 +383,7 @@ AdMob.addListener(RewardAdPluginEvents.Rewarded, async () => {
|
|
|
335
383
|
</docgen-index>
|
|
336
384
|
|
|
337
385
|
## API
|
|
386
|
+
|
|
338
387
|
<docgen-api>
|
|
339
388
|
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
340
389
|
|
|
@@ -459,7 +508,7 @@ Destroy the banner, remove it from screen.
|
|
|
459
508
|
### addListener(BannerAdPluginEvents.SizeChanged, ...)
|
|
460
509
|
|
|
461
510
|
```typescript
|
|
462
|
-
addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void) => PluginListenerHandle
|
|
511
|
+
addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void) => Promise<PluginListenerHandle>
|
|
463
512
|
```
|
|
464
513
|
|
|
465
514
|
| Param | Type | Description |
|
|
@@ -467,7 +516,7 @@ addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: Ad
|
|
|
467
516
|
| **`eventName`** | <code><a href="#banneradpluginevents">BannerAdPluginEvents.SizeChanged</a></code> | bannerAdSizeChanged |
|
|
468
517
|
| **`listenerFunc`** | <code>(info: <a href="#admobbannersize">AdMobBannerSize</a>) => void</code> | |
|
|
469
518
|
|
|
470
|
-
**Returns:** <code
|
|
519
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
471
520
|
|
|
472
521
|
--------------------
|
|
473
522
|
|
|
@@ -475,7 +524,7 @@ addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: Ad
|
|
|
475
524
|
### addListener(BannerAdPluginEvents.Loaded, ...)
|
|
476
525
|
|
|
477
526
|
```typescript
|
|
478
|
-
addListener(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void) => PluginListenerHandle
|
|
527
|
+
addListener(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
479
528
|
```
|
|
480
529
|
|
|
481
530
|
Notice: request loaded Banner ad
|
|
@@ -485,7 +534,7 @@ Notice: request loaded Banner ad
|
|
|
485
534
|
| **`eventName`** | <code><a href="#banneradpluginevents">BannerAdPluginEvents.Loaded</a></code> | bannerAdLoaded |
|
|
486
535
|
| **`listenerFunc`** | <code>() => void</code> | |
|
|
487
536
|
|
|
488
|
-
**Returns:** <code
|
|
537
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
489
538
|
|
|
490
539
|
--------------------
|
|
491
540
|
|
|
@@ -493,7 +542,7 @@ Notice: request loaded Banner ad
|
|
|
493
542
|
### addListener(BannerAdPluginEvents.FailedToLoad, ...)
|
|
494
543
|
|
|
495
544
|
```typescript
|
|
496
|
-
addListener(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void) => PluginListenerHandle
|
|
545
|
+
addListener(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void) => Promise<PluginListenerHandle>
|
|
497
546
|
```
|
|
498
547
|
|
|
499
548
|
Notice: request failed Banner ad
|
|
@@ -503,7 +552,7 @@ Notice: request failed Banner ad
|
|
|
503
552
|
| **`eventName`** | <code><a href="#banneradpluginevents">BannerAdPluginEvents.FailedToLoad</a></code> | bannerAdFailedToLoad |
|
|
504
553
|
| **`listenerFunc`** | <code>(info: <a href="#admoberror">AdMobError</a>) => void</code> | |
|
|
505
554
|
|
|
506
|
-
**Returns:** <code
|
|
555
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
507
556
|
|
|
508
557
|
--------------------
|
|
509
558
|
|
|
@@ -511,7 +560,7 @@ Notice: request failed Banner ad
|
|
|
511
560
|
### addListener(BannerAdPluginEvents.Opened, ...)
|
|
512
561
|
|
|
513
562
|
```typescript
|
|
514
|
-
addListener(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void) => PluginListenerHandle
|
|
563
|
+
addListener(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
515
564
|
```
|
|
516
565
|
|
|
517
566
|
Notice: full-screen banner view will be presented in response to the user clicking on an ad.
|
|
@@ -521,7 +570,7 @@ Notice: full-screen banner view will be presented in response to the user clicki
|
|
|
521
570
|
| **`eventName`** | <code><a href="#banneradpluginevents">BannerAdPluginEvents.Opened</a></code> | bannerAdOpened |
|
|
522
571
|
| **`listenerFunc`** | <code>() => void</code> | |
|
|
523
572
|
|
|
524
|
-
**Returns:** <code
|
|
573
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
525
574
|
|
|
526
575
|
--------------------
|
|
527
576
|
|
|
@@ -529,7 +578,7 @@ Notice: full-screen banner view will be presented in response to the user clicki
|
|
|
529
578
|
### addListener(BannerAdPluginEvents.Closed, ...)
|
|
530
579
|
|
|
531
580
|
```typescript
|
|
532
|
-
addListener(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void) => PluginListenerHandle
|
|
581
|
+
addListener(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
533
582
|
```
|
|
534
583
|
|
|
535
584
|
Notice: The full-screen banner view will been dismissed.
|
|
@@ -539,7 +588,7 @@ Notice: The full-screen banner view will been dismissed.
|
|
|
539
588
|
| **`eventName`** | <code><a href="#banneradpluginevents">BannerAdPluginEvents.Closed</a></code> | bannerAdClosed |
|
|
540
589
|
| **`listenerFunc`** | <code>() => void</code> | |
|
|
541
590
|
|
|
542
|
-
**Returns:** <code
|
|
591
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
543
592
|
|
|
544
593
|
--------------------
|
|
545
594
|
|
|
@@ -547,7 +596,7 @@ Notice: The full-screen banner view will been dismissed.
|
|
|
547
596
|
### addListener(BannerAdPluginEvents.AdImpression, ...)
|
|
548
597
|
|
|
549
598
|
```typescript
|
|
550
|
-
addListener(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void) => PluginListenerHandle
|
|
599
|
+
addListener(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
551
600
|
```
|
|
552
601
|
|
|
553
602
|
Unimplemented
|
|
@@ -557,7 +606,7 @@ Unimplemented
|
|
|
557
606
|
| **`eventName`** | <code><a href="#banneradpluginevents">BannerAdPluginEvents.AdImpression</a></code> | AdImpression |
|
|
558
607
|
| **`listenerFunc`** | <code>() => void</code> | |
|
|
559
608
|
|
|
560
|
-
**Returns:** <code
|
|
609
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
561
610
|
|
|
562
611
|
--------------------
|
|
563
612
|
|
|
@@ -634,7 +683,7 @@ Show interstitial ad when it’s ready
|
|
|
634
683
|
### addListener(InterstitialAdPluginEvents.FailedToLoad, ...)
|
|
635
684
|
|
|
636
685
|
```typescript
|
|
637
|
-
addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle
|
|
686
|
+
addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
|
|
638
687
|
```
|
|
639
688
|
|
|
640
689
|
| Param | Type |
|
|
@@ -642,7 +691,7 @@ addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (e
|
|
|
642
691
|
| **`eventName`** | <code><a href="#interstitialadpluginevents">InterstitialAdPluginEvents.FailedToLoad</a></code> |
|
|
643
692
|
| **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) => void</code> |
|
|
644
693
|
|
|
645
|
-
**Returns:** <code
|
|
694
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
646
695
|
|
|
647
696
|
--------------------
|
|
648
697
|
|
|
@@ -650,7 +699,7 @@ addListener(eventName: InterstitialAdPluginEvents.FailedToLoad, listenerFunc: (e
|
|
|
650
699
|
### addListener(InterstitialAdPluginEvents.Loaded, ...)
|
|
651
700
|
|
|
652
701
|
```typescript
|
|
653
|
-
addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => PluginListenerHandle
|
|
702
|
+
addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => Promise<PluginListenerHandle>
|
|
654
703
|
```
|
|
655
704
|
|
|
656
705
|
| Param | Type |
|
|
@@ -658,7 +707,7 @@ addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: A
|
|
|
658
707
|
| **`eventName`** | <code><a href="#interstitialadpluginevents">InterstitialAdPluginEvents.Loaded</a></code> |
|
|
659
708
|
| **`listenerFunc`** | <code>(info: <a href="#adloadinfo">AdLoadInfo</a>) => void</code> |
|
|
660
709
|
|
|
661
|
-
**Returns:** <code
|
|
710
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
662
711
|
|
|
663
712
|
--------------------
|
|
664
713
|
|
|
@@ -666,7 +715,7 @@ addListener(eventName: InterstitialAdPluginEvents.Loaded, listenerFunc: (info: A
|
|
|
666
715
|
### addListener(InterstitialAdPluginEvents.Dismissed, ...)
|
|
667
716
|
|
|
668
717
|
```typescript
|
|
669
|
-
addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void) => PluginListenerHandle
|
|
718
|
+
addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
670
719
|
```
|
|
671
720
|
|
|
672
721
|
| Param | Type |
|
|
@@ -674,7 +723,7 @@ addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () =>
|
|
|
674
723
|
| **`eventName`** | <code><a href="#interstitialadpluginevents">InterstitialAdPluginEvents.Dismissed</a></code> |
|
|
675
724
|
| **`listenerFunc`** | <code>() => void</code> |
|
|
676
725
|
|
|
677
|
-
**Returns:** <code
|
|
726
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
678
727
|
|
|
679
728
|
--------------------
|
|
680
729
|
|
|
@@ -682,7 +731,7 @@ addListener(eventName: InterstitialAdPluginEvents.Dismissed, listenerFunc: () =>
|
|
|
682
731
|
### addListener(InterstitialAdPluginEvents.FailedToShow, ...)
|
|
683
732
|
|
|
684
733
|
```typescript
|
|
685
|
-
addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle
|
|
734
|
+
addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
|
|
686
735
|
```
|
|
687
736
|
|
|
688
737
|
| Param | Type |
|
|
@@ -690,7 +739,7 @@ addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (e
|
|
|
690
739
|
| **`eventName`** | <code><a href="#interstitialadpluginevents">InterstitialAdPluginEvents.FailedToShow</a></code> |
|
|
691
740
|
| **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) => void</code> |
|
|
692
741
|
|
|
693
|
-
**Returns:** <code
|
|
742
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
694
743
|
|
|
695
744
|
--------------------
|
|
696
745
|
|
|
@@ -698,7 +747,7 @@ addListener(eventName: InterstitialAdPluginEvents.FailedToShow, listenerFunc: (e
|
|
|
698
747
|
### addListener(InterstitialAdPluginEvents.Showed, ...)
|
|
699
748
|
|
|
700
749
|
```typescript
|
|
701
|
-
addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void) => PluginListenerHandle
|
|
750
|
+
addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
702
751
|
```
|
|
703
752
|
|
|
704
753
|
| Param | Type |
|
|
@@ -706,7 +755,7 @@ addListener(eventName: InterstitialAdPluginEvents.Showed, listenerFunc: () => vo
|
|
|
706
755
|
| **`eventName`** | <code><a href="#interstitialadpluginevents">InterstitialAdPluginEvents.Showed</a></code> |
|
|
707
756
|
| **`listenerFunc`** | <code>() => void</code> |
|
|
708
757
|
|
|
709
|
-
**Returns:** <code
|
|
758
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
710
759
|
|
|
711
760
|
--------------------
|
|
712
761
|
|
|
@@ -744,7 +793,7 @@ Show a reward video ad
|
|
|
744
793
|
### addListener(RewardAdPluginEvents.FailedToLoad, ...)
|
|
745
794
|
|
|
746
795
|
```typescript
|
|
747
|
-
addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle
|
|
796
|
+
addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
|
|
748
797
|
```
|
|
749
798
|
|
|
750
799
|
| Param | Type |
|
|
@@ -752,7 +801,7 @@ addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error:
|
|
|
752
801
|
| **`eventName`** | <code><a href="#rewardadpluginevents">RewardAdPluginEvents.FailedToLoad</a></code> |
|
|
753
802
|
| **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) => void</code> |
|
|
754
803
|
|
|
755
|
-
**Returns:** <code
|
|
804
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
756
805
|
|
|
757
806
|
--------------------
|
|
758
807
|
|
|
@@ -760,7 +809,7 @@ addListener(eventName: RewardAdPluginEvents.FailedToLoad, listenerFunc: (error:
|
|
|
760
809
|
### addListener(RewardAdPluginEvents.Loaded, ...)
|
|
761
810
|
|
|
762
811
|
```typescript
|
|
763
|
-
addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => PluginListenerHandle
|
|
812
|
+
addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => Promise<PluginListenerHandle>
|
|
764
813
|
```
|
|
765
814
|
|
|
766
815
|
| Param | Type |
|
|
@@ -768,7 +817,7 @@ addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadI
|
|
|
768
817
|
| **`eventName`** | <code><a href="#rewardadpluginevents">RewardAdPluginEvents.Loaded</a></code> |
|
|
769
818
|
| **`listenerFunc`** | <code>(info: <a href="#adloadinfo">AdLoadInfo</a>) => void</code> |
|
|
770
819
|
|
|
771
|
-
**Returns:** <code
|
|
820
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
772
821
|
|
|
773
822
|
--------------------
|
|
774
823
|
|
|
@@ -776,7 +825,7 @@ addListener(eventName: RewardAdPluginEvents.Loaded, listenerFunc: (info: AdLoadI
|
|
|
776
825
|
### addListener(RewardAdPluginEvents.Rewarded, ...)
|
|
777
826
|
|
|
778
827
|
```typescript
|
|
779
|
-
addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void) => PluginListenerHandle
|
|
828
|
+
addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardItem) => void) => Promise<PluginListenerHandle>
|
|
780
829
|
```
|
|
781
830
|
|
|
782
831
|
| Param | Type |
|
|
@@ -784,7 +833,7 @@ addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdM
|
|
|
784
833
|
| **`eventName`** | <code><a href="#rewardadpluginevents">RewardAdPluginEvents.Rewarded</a></code> |
|
|
785
834
|
| **`listenerFunc`** | <code>(reward: <a href="#admobrewarditem">AdMobRewardItem</a>) => void</code> |
|
|
786
835
|
|
|
787
|
-
**Returns:** <code
|
|
836
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
788
837
|
|
|
789
838
|
--------------------
|
|
790
839
|
|
|
@@ -792,7 +841,7 @@ addListener(eventName: RewardAdPluginEvents.Rewarded, listenerFunc: (reward: AdM
|
|
|
792
841
|
### addListener(RewardAdPluginEvents.Dismissed, ...)
|
|
793
842
|
|
|
794
843
|
```typescript
|
|
795
|
-
addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void) => PluginListenerHandle
|
|
844
|
+
addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
796
845
|
```
|
|
797
846
|
|
|
798
847
|
| Param | Type |
|
|
@@ -800,7 +849,7 @@ addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void)
|
|
|
800
849
|
| **`eventName`** | <code><a href="#rewardadpluginevents">RewardAdPluginEvents.Dismissed</a></code> |
|
|
801
850
|
| **`listenerFunc`** | <code>() => void</code> |
|
|
802
851
|
|
|
803
|
-
**Returns:** <code
|
|
852
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
804
853
|
|
|
805
854
|
--------------------
|
|
806
855
|
|
|
@@ -808,7 +857,7 @@ addListener(eventName: RewardAdPluginEvents.Dismissed, listenerFunc: () => void)
|
|
|
808
857
|
### addListener(RewardAdPluginEvents.FailedToShow, ...)
|
|
809
858
|
|
|
810
859
|
```typescript
|
|
811
|
-
addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => PluginListenerHandle
|
|
860
|
+
addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
|
|
812
861
|
```
|
|
813
862
|
|
|
814
863
|
| Param | Type |
|
|
@@ -816,7 +865,7 @@ addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error:
|
|
|
816
865
|
| **`eventName`** | <code><a href="#rewardadpluginevents">RewardAdPluginEvents.FailedToShow</a></code> |
|
|
817
866
|
| **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) => void</code> |
|
|
818
867
|
|
|
819
|
-
**Returns:** <code
|
|
868
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
820
869
|
|
|
821
870
|
--------------------
|
|
822
871
|
|
|
@@ -824,7 +873,7 @@ addListener(eventName: RewardAdPluginEvents.FailedToShow, listenerFunc: (error:
|
|
|
824
873
|
### addListener(RewardAdPluginEvents.Showed, ...)
|
|
825
874
|
|
|
826
875
|
```typescript
|
|
827
|
-
addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) => PluginListenerHandle
|
|
876
|
+
addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
828
877
|
```
|
|
829
878
|
|
|
830
879
|
| Param | Type |
|
|
@@ -832,7 +881,133 @@ addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) =>
|
|
|
832
881
|
| **`eventName`** | <code><a href="#rewardadpluginevents">RewardAdPluginEvents.Showed</a></code> |
|
|
833
882
|
| **`listenerFunc`** | <code>() => void</code> |
|
|
834
883
|
|
|
835
|
-
**Returns:** <code
|
|
884
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
885
|
+
|
|
886
|
+
--------------------
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
### prepareRewardInterstitialAd(...)
|
|
890
|
+
|
|
891
|
+
```typescript
|
|
892
|
+
prepareRewardInterstitialAd(options: RewardInterstitialAdOptions) => Promise<AdLoadInfo>
|
|
893
|
+
```
|
|
894
|
+
|
|
895
|
+
Prepare a reward video ad
|
|
896
|
+
|
|
897
|
+
| Param | Type | Description |
|
|
898
|
+
| ------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------- |
|
|
899
|
+
| **`options`** | <code><a href="#rewardinterstitialadoptions">RewardInterstitialAdOptions</a></code> | <a href="#rewardadoptions">RewardAdOptions</a> |
|
|
900
|
+
|
|
901
|
+
**Returns:** <code>Promise<<a href="#adloadinfo">AdLoadInfo</a>></code>
|
|
902
|
+
|
|
903
|
+
--------------------
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
### showRewardInterstitialAd()
|
|
907
|
+
|
|
908
|
+
```typescript
|
|
909
|
+
showRewardInterstitialAd() => Promise<AdMobRewardInterstitialItem>
|
|
910
|
+
```
|
|
911
|
+
|
|
912
|
+
Show a reward video ad
|
|
913
|
+
|
|
914
|
+
**Returns:** <code>Promise<<a href="#admobrewardinterstitialitem">AdMobRewardInterstitialItem</a>></code>
|
|
915
|
+
|
|
916
|
+
--------------------
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
### addListener(RewardInterstitialAdPluginEvents.FailedToLoad, ...)
|
|
920
|
+
|
|
921
|
+
```typescript
|
|
922
|
+
addListener(eventName: RewardInterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
|
|
923
|
+
```
|
|
924
|
+
|
|
925
|
+
| Param | Type |
|
|
926
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------------- |
|
|
927
|
+
| **`eventName`** | <code><a href="#rewardinterstitialadpluginevents">RewardInterstitialAdPluginEvents.FailedToLoad</a></code> |
|
|
928
|
+
| **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) => void</code> |
|
|
929
|
+
|
|
930
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
931
|
+
|
|
932
|
+
--------------------
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
### addListener(RewardInterstitialAdPluginEvents.Loaded, ...)
|
|
936
|
+
|
|
937
|
+
```typescript
|
|
938
|
+
addListener(eventName: RewardInterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => Promise<PluginListenerHandle>
|
|
939
|
+
```
|
|
940
|
+
|
|
941
|
+
| Param | Type |
|
|
942
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------- |
|
|
943
|
+
| **`eventName`** | <code><a href="#rewardinterstitialadpluginevents">RewardInterstitialAdPluginEvents.Loaded</a></code> |
|
|
944
|
+
| **`listenerFunc`** | <code>(info: <a href="#adloadinfo">AdLoadInfo</a>) => void</code> |
|
|
945
|
+
|
|
946
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
947
|
+
|
|
948
|
+
--------------------
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
### addListener(RewardInterstitialAdPluginEvents.Rewarded, ...)
|
|
952
|
+
|
|
953
|
+
```typescript
|
|
954
|
+
addListener(eventName: RewardInterstitialAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardInterstitialItem) => void) => Promise<PluginListenerHandle>
|
|
955
|
+
```
|
|
956
|
+
|
|
957
|
+
| Param | Type |
|
|
958
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------- |
|
|
959
|
+
| **`eventName`** | <code><a href="#rewardinterstitialadpluginevents">RewardInterstitialAdPluginEvents.Rewarded</a></code> |
|
|
960
|
+
| **`listenerFunc`** | <code>(reward: <a href="#admobrewardinterstitialitem">AdMobRewardInterstitialItem</a>) => void</code> |
|
|
961
|
+
|
|
962
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
963
|
+
|
|
964
|
+
--------------------
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
### addListener(RewardInterstitialAdPluginEvents.Dismissed, ...)
|
|
968
|
+
|
|
969
|
+
```typescript
|
|
970
|
+
addListener(eventName: RewardInterstitialAdPluginEvents.Dismissed, listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
971
|
+
```
|
|
972
|
+
|
|
973
|
+
| Param | Type |
|
|
974
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------- |
|
|
975
|
+
| **`eventName`** | <code><a href="#rewardinterstitialadpluginevents">RewardInterstitialAdPluginEvents.Dismissed</a></code> |
|
|
976
|
+
| **`listenerFunc`** | <code>() => void</code> |
|
|
977
|
+
|
|
978
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
979
|
+
|
|
980
|
+
--------------------
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
### addListener(RewardInterstitialAdPluginEvents.FailedToShow, ...)
|
|
984
|
+
|
|
985
|
+
```typescript
|
|
986
|
+
addListener(eventName: RewardInterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
|
|
987
|
+
```
|
|
988
|
+
|
|
989
|
+
| Param | Type |
|
|
990
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------------- |
|
|
991
|
+
| **`eventName`** | <code><a href="#rewardinterstitialadpluginevents">RewardInterstitialAdPluginEvents.FailedToShow</a></code> |
|
|
992
|
+
| **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) => void</code> |
|
|
993
|
+
|
|
994
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
995
|
+
|
|
996
|
+
--------------------
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
### addListener(RewardInterstitialAdPluginEvents.Showed, ...)
|
|
1000
|
+
|
|
1001
|
+
```typescript
|
|
1002
|
+
addListener(eventName: RewardInterstitialAdPluginEvents.Showed, listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
1003
|
+
```
|
|
1004
|
+
|
|
1005
|
+
| Param | Type |
|
|
1006
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------- |
|
|
1007
|
+
| **`eventName`** | <code><a href="#rewardinterstitialadpluginevents">RewardInterstitialAdPluginEvents.Showed</a></code> |
|
|
1008
|
+
| **`listenerFunc`** | <code>() => void</code> |
|
|
1009
|
+
|
|
1010
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
836
1011
|
|
|
837
1012
|
--------------------
|
|
838
1013
|
|
|
@@ -962,6 +1137,24 @@ https://developers.google.com/admob/android/rewarded-video-adapters?hl=en
|
|
|
962
1137
|
| **`amount`** | <code>number</code> | Rewarded amount user got |
|
|
963
1138
|
|
|
964
1139
|
|
|
1140
|
+
#### RewardInterstitialAdOptions
|
|
1141
|
+
|
|
1142
|
+
| Prop | Type | Description |
|
|
1143
|
+
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1144
|
+
| **`ssv`** | <code><a href="#atleastone">AtLeastOne</a><{ /** * An optional UserId to pass to your SSV callback function. */ userId: string; /** * An optional custom set of data to pass to your SSV callback function. */ customData: string; }></code> | If you have enabled SSV in your AdMob Application. You can provide customData or a userId be passed to your callback to do further processing on. *Important* You *HAVE* to define one of them. |
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
#### AdMobRewardInterstitialItem
|
|
1148
|
+
|
|
1149
|
+
For more information
|
|
1150
|
+
https://developers.google.com/admob/android/rewarded-video-adapters?hl=en
|
|
1151
|
+
|
|
1152
|
+
| Prop | Type | Description |
|
|
1153
|
+
| ------------ | ------------------- | ------------------------ |
|
|
1154
|
+
| **`type`** | <code>string</code> | Rewarded type user got |
|
|
1155
|
+
| **`amount`** | <code>number</code> | Rewarded amount user got |
|
|
1156
|
+
|
|
1157
|
+
|
|
965
1158
|
### Type Aliases
|
|
966
1159
|
|
|
967
1160
|
|
|
@@ -1065,6 +1258,18 @@ From T, pick a set of properties whose keys are in the union K
|
|
|
1065
1258
|
| **`Dismissed`** | <code>'onRewardedVideoAdDismissed'</code> | Emits when the AdReward video is not visible to the user anymore. **Important**: This has nothing to do with the reward it self. This event will emits in this two cases: 1. The user starts the video ad but close it before the reward emit. 2. The user start the video and see it until end, then gets the reward and after that the ad is closed. |
|
|
1066
1259
|
| **`Rewarded`** | <code>'onRewardedVideoAdReward'</code> | Emits when user get rewarded from AdReward |
|
|
1067
1260
|
|
|
1261
|
+
|
|
1262
|
+
#### RewardInterstitialAdPluginEvents
|
|
1263
|
+
|
|
1264
|
+
| Members | Value | Description |
|
|
1265
|
+
| ------------------ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1266
|
+
| **`Loaded`** | <code>'onRewardedInterstitialAdLoaded'</code> | Emits after trying to prepare a RewardAd and the Video is loaded and ready to be show |
|
|
1267
|
+
| **`FailedToLoad`** | <code>'onRewardedInterstitialAdFailedToLoad'</code> | Emits after trying to prepare a RewardAd when it could not be loaded |
|
|
1268
|
+
| **`Showed`** | <code>'onRewardedInterstitialAdShowed'</code> | Emits when the AdReward video is visible to the user |
|
|
1269
|
+
| **`FailedToShow`** | <code>'onRewardedInterstitialAdFailedToShow'</code> | Emits when the AdReward video is failed to show |
|
|
1270
|
+
| **`Dismissed`** | <code>'onRewardedInterstitialAdDismissed'</code> | Emits when the AdReward video is not visible to the user anymore. **Important**: This has nothing to do with the reward it self. This event will emits in this two cases: 1. The user starts the video ad but close it before the reward emit. 2. The user start the video and see it until end, then gets the reward and after that the ad is closed. |
|
|
1271
|
+
| **`Rewarded`** | <code>'onRewardedInterstitialAdReward'</code> | Emits when user get rewarded from AdReward |
|
|
1272
|
+
|
|
1068
1273
|
</docgen-api>
|
|
1069
1274
|
|
|
1070
1275
|
## TROUBLE SHOOTING
|