@ququplay/admob 6.0.0 → 7.0.1
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/Package.swift +30 -0
- package/README.md +343 -115
- package/android/build.gradle +11 -11
- package/android/src/main/java/com/getcapacitor/community/admob/AdMob.java +17 -0
- 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 +17 -21
- package/android/src/main/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutor.java +17 -21
- package/android/src/main/java/com/getcapacitor/community/admob/models/AdOptions.java +10 -0
- 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 +80 -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 +399 -749
- 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 +2 -1
- package/dist/esm/index.js.map +1 -1
- 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 -0
- package/dist/esm/web.js +12 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +48 -3
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +49 -4
- package/dist/plugin.js.map +1 -1
- package/ios/{Plugin/Plugin.swift → Sources/AdMobPlugin/AdMobPlugin.swift} +46 -4
- package/ios/{Plugin → Sources/AdMobPlugin}/Banner/BannerExecutor.swift +7 -7
- package/ios/{Plugin → Sources/AdMobPlugin}/Consent/ConsentExecutor.swift +1 -1
- package/ios/{Plugin → Sources/AdMobPlugin}/Interstitial/AdInterstitialExecutor.swift +4 -4
- package/ios/{Plugin → Sources/AdMobPlugin}/Rewarded/AdRewardExecutor.swift +4 -4
- package/ios/Sources/AdMobPlugin/RewardedInterstitial/AdRewardInterstitialExecutor.swift +86 -0
- package/ios/Sources/AdMobPlugin/RewardedInterstitial/RewardInterstitialAdPluginEvents.swift +8 -0
- package/ios/Tests/AdMobPluginTests/AdMobPluginTests.swift +15 -0
- package/package.json +31 -35
- package/QuquplayAdmob.podspec +0 -19
- package/ios/Plugin/Info.plist +0 -24
- package/ios/Plugin/Plugin.h +0 -10
- package/ios/Plugin/Plugin.m +0 -23
- /package/ios/{Plugin → Sources/AdMobPlugin}/Banner/BannerAdPluginEvents.swift +0 -0
- /package/ios/{Plugin → Sources/AdMobPlugin}/Banner/BannerAdSizeEnum.swift +0 -0
- /package/ios/{Plugin → Sources/AdMobPlugin}/Helper/AuthorizationStatusEnum.swift +0 -0
- /package/ios/{Plugin → Sources/AdMobPlugin}/Interstitial/InterstitialAdPluginEvents.swift +0 -0
- /package/ios/{Plugin → Sources/AdMobPlugin}/Models/FullScreenAdEventName.swift +0 -0
- /package/ios/{Plugin → Sources/AdMobPlugin}/Rewarded/RewardAdPluginEvents.swift +0 -0
package/README.md
CHANGED
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
|
-
<img src="https://img.shields.io/maintenance/yes/
|
|
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> -->
|
|
9
|
+
<img src="https://img.shields.io/maintenance/yes/2025?style=flat-square" />
|
|
11
10
|
<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
11
|
<br>
|
|
13
12
|
<a href="https://www.npmjs.com/package/@capacitor-community/admob"><img src="https://img.shields.io/npm/dw/@capacitor-community/admob?style=flat-square" /></a>
|
|
@@ -16,14 +15,15 @@
|
|
|
16
15
|
|
|
17
16
|
## Maintainers
|
|
18
17
|
|
|
19
|
-
| Maintainer | GitHub
|
|
20
|
-
| ------------------- |
|
|
21
|
-
| Masahiko Sakakibara | [rdlabo](https://github.com/rdlabo)
|
|
22
|
-
| Saninn Salas Diaz
|
|
18
|
+
| Maintainer | GitHub | Social | Sponsoring Company |
|
|
19
|
+
| ------------------- | ------------------------------------------------ | ----------------------------------------------- | ---------------------------------------------- |
|
|
20
|
+
| Masahiko Sakakibara | [rdlabo](https://github.com/rdlabo) | [@rdlabo](https://twitter.com/rdlabo) | RELATION DESIGN LABO, GENERAL INC. ASSOCIATION |
|
|
21
|
+
| Saninn Salas Diaz | [Saninn Salas Diaz](https://github.com/distante) | [@SaninnSalas](https://twitter.com/SaninnSalas) | |
|
|
23
22
|
|
|
24
23
|
Maintenance Status: Actively Maintained
|
|
25
24
|
|
|
26
25
|
## Contributors ✨
|
|
26
|
+
|
|
27
27
|
<a href="https://github.com/capacitor-community/admob/graphs/contributors">
|
|
28
28
|
<img src="https://contrib.rocks/image?repo=capacitor-community/admob" />
|
|
29
29
|
</a>
|
|
@@ -42,24 +42,11 @@ Made with [contributors-img](https://contrib.rocks).
|
|
|
42
42
|
| **Android** |  |  |  |
|
|
43
43
|
|
|
44
44
|
## Installation
|
|
45
|
-
If you use capacitor 5:
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
% npm install --save @capacitor-community/admob@5.0.0
|
|
49
|
-
% npx cap update
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
If you use capacitor 4:
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
% npm install --save @capacitor-community/admob@4.0.0
|
|
56
|
-
% npx cap update
|
|
57
|
-
```
|
|
58
45
|
|
|
59
|
-
capacitor
|
|
46
|
+
If you use capacitor 6:
|
|
60
47
|
|
|
61
48
|
```
|
|
62
|
-
% npm install --save @capacitor-community/admob@
|
|
49
|
+
% npm install --save @capacitor-community/admob@6
|
|
63
50
|
% npx cap update
|
|
64
51
|
```
|
|
65
52
|
|
|
@@ -119,34 +106,34 @@ import { AdMob } from '@capacitor-community/admob';
|
|
|
119
106
|
|
|
120
107
|
export async function initialize(): Promise<void> {
|
|
121
108
|
await AdMob.initialize();
|
|
122
|
-
|
|
109
|
+
|
|
123
110
|
const [trackingInfo, consentInfo] = await Promise.all([
|
|
124
|
-
|
|
125
|
-
|
|
111
|
+
AdMob.trackingAuthorizationStatus(),
|
|
112
|
+
AdMob.requestConsentInfo(),
|
|
126
113
|
]);
|
|
127
|
-
|
|
114
|
+
|
|
128
115
|
if (trackingInfo.status === 'notDetermined') {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
116
|
+
/**
|
|
117
|
+
* If you want to explain TrackingAuthorization before showing the iOS dialog,
|
|
118
|
+
* you can show the modal here.
|
|
119
|
+
* ex)
|
|
120
|
+
* const modal = await this.modalCtrl.create({
|
|
121
|
+
* component: RequestTrackingPage,
|
|
122
|
+
* });
|
|
123
|
+
* await modal.present();
|
|
124
|
+
* await modal.onDidDismiss(); // Wait for close modal
|
|
125
|
+
**/
|
|
126
|
+
|
|
127
|
+
await AdMob.requestTrackingAuthorization();
|
|
141
128
|
}
|
|
142
129
|
|
|
143
130
|
const authorizationStatus = await AdMob.trackingAuthorizationStatus();
|
|
144
131
|
if (
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
132
|
+
authorizationStatus.status === 'authorized' &&
|
|
133
|
+
consentInfo.isConsentFormAvailable &&
|
|
134
|
+
consentInfo.status === AdmobConsentStatus.REQUIRED
|
|
148
135
|
) {
|
|
149
|
-
|
|
136
|
+
await AdMob.showConsentForm();
|
|
150
137
|
}
|
|
151
138
|
}
|
|
152
139
|
```
|
|
@@ -180,10 +167,10 @@ async showConsent() {
|
|
|
180
167
|
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).
|
|
181
168
|
|
|
182
169
|
```ts
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
170
|
+
const consentInfo = await AdMob.requestConsentInfo({
|
|
171
|
+
debugGeography: AdmobConsentDebugGeography.EEA,
|
|
172
|
+
testDeviceIdentifiers: ['YOUR_DEVICE_ID'],
|
|
173
|
+
});
|
|
187
174
|
```
|
|
188
175
|
|
|
189
176
|
**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.
|
|
@@ -193,38 +180,53 @@ If you testing on real device, you have to set `debugGeography` and add your dev
|
|
|
193
180
|
1. AdMob.initialize
|
|
194
181
|
2. AdMob.requestConsentInfo
|
|
195
182
|
3. AdMob.showConsentForm (If consent form required )
|
|
196
|
-
3/ AdMob.showBanner
|
|
183
|
+
3/ AdMob.showBanner
|
|
197
184
|
|
|
198
185
|
### Show Banner
|
|
199
186
|
|
|
200
187
|
```ts
|
|
201
|
-
import {
|
|
188
|
+
import {
|
|
189
|
+
AdMob,
|
|
190
|
+
BannerAdOptions,
|
|
191
|
+
BannerAdSize,
|
|
192
|
+
BannerAdPosition,
|
|
193
|
+
BannerAdPluginEvents,
|
|
194
|
+
AdMobBannerSize,
|
|
195
|
+
} from '@capacitor-community/admob';
|
|
202
196
|
|
|
203
197
|
export async function banner(): Promise<void> {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
198
|
+
AdMob.addListener(BannerAdPluginEvents.Loaded, () => {
|
|
199
|
+
// Subscribe Banner Event Listener
|
|
200
|
+
});
|
|
207
201
|
|
|
208
|
-
|
|
202
|
+
AdMob.addListener(
|
|
203
|
+
BannerAdPluginEvents.SizeChanged,
|
|
204
|
+
(size: AdMobBannerSize) => {
|
|
209
205
|
// Subscribe Change Banner Size
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
206
|
+
},
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
const options: BannerAdOptions = {
|
|
210
|
+
adId: 'YOUR ADID',
|
|
211
|
+
adSize: BannerAdSize.BANNER,
|
|
212
|
+
position: BannerAdPosition.BOTTOM_CENTER,
|
|
213
|
+
margin: 0,
|
|
214
|
+
// isTesting: true
|
|
215
|
+
// npa: true
|
|
216
|
+
};
|
|
217
|
+
AdMob.showBanner(options);
|
|
221
218
|
}
|
|
222
219
|
```
|
|
223
220
|
|
|
224
221
|
### Show Interstitial
|
|
225
222
|
|
|
226
223
|
```ts
|
|
227
|
-
import {
|
|
224
|
+
import {
|
|
225
|
+
AdMob,
|
|
226
|
+
AdOptions,
|
|
227
|
+
AdLoadInfo,
|
|
228
|
+
InterstitialAdPluginEvents,
|
|
229
|
+
} from '@capacitor-community/admob';
|
|
228
230
|
|
|
229
231
|
export async function interstitial(): Promise<void> {
|
|
230
232
|
AdMob.addListener(InterstitialAdPluginEvents.Loaded, (info: AdLoadInfo) => {
|
|
@@ -244,17 +246,26 @@ export async function interstitial(): Promise<void> {
|
|
|
244
246
|
### Show RewardVideo
|
|
245
247
|
|
|
246
248
|
```ts
|
|
247
|
-
import {
|
|
249
|
+
import {
|
|
250
|
+
AdMob,
|
|
251
|
+
RewardAdOptions,
|
|
252
|
+
AdLoadInfo,
|
|
253
|
+
RewardAdPluginEvents,
|
|
254
|
+
AdMobRewardItem,
|
|
255
|
+
} from '@capacitor-community/admob';
|
|
248
256
|
|
|
249
257
|
export async function rewardVideo(): Promise<void> {
|
|
250
258
|
AdMob.addListener(RewardAdPluginEvents.Loaded, (info: AdLoadInfo) => {
|
|
251
259
|
// Subscribe prepared rewardVideo
|
|
252
260
|
});
|
|
253
261
|
|
|
254
|
-
AdMob.addListener(
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
262
|
+
AdMob.addListener(
|
|
263
|
+
RewardAdPluginEvents.Rewarded,
|
|
264
|
+
(rewardItem: AdMobRewardItem) => {
|
|
265
|
+
// Subscribe user rewarded
|
|
266
|
+
console.log(rewardItem);
|
|
267
|
+
},
|
|
268
|
+
);
|
|
258
269
|
|
|
259
270
|
const options: RewardAdOptions = {
|
|
260
271
|
adId: 'YOUR ADID',
|
|
@@ -271,27 +282,31 @@ export async function rewardVideo(): Promise<void> {
|
|
|
271
282
|
```
|
|
272
283
|
|
|
273
284
|
## Server-side Verification Notice
|
|
285
|
+
|
|
274
286
|
SSV callbacks are only fired on Production Adverts, therefore test Ads will not fire off your SSV callback.
|
|
275
287
|
|
|
276
288
|
For E2E tests or just for validating the data in your `RewardAdOptions` work as expected, you can add a custom GET
|
|
277
289
|
request to your mock endpoint after the `RewardAdPluginEvents.Rewarded` similar to this:
|
|
290
|
+
|
|
278
291
|
```ts
|
|
279
292
|
AdMob.addListener(RewardAdPluginEvents.Rewarded, async () => {
|
|
280
293
|
// ...
|
|
281
294
|
if (ENVIRONMENT_IS_DEVELOPMENT) {
|
|
282
295
|
try {
|
|
283
|
-
const url =
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
296
|
+
const url =
|
|
297
|
+
`https://your-staging-ssv-endpoint` +
|
|
298
|
+
new URLSearchParams({
|
|
299
|
+
ad_network: 'TEST',
|
|
300
|
+
ad_unit: 'TEST',
|
|
301
|
+
custom_data: customData, // <-- passed CustomData
|
|
302
|
+
reward_amount: 'TEST',
|
|
303
|
+
reward_item: 'TEST',
|
|
304
|
+
timestamp: 'TEST',
|
|
305
|
+
transaction_id: 'TEST',
|
|
306
|
+
user_id: userId, // <-- Passed UserID
|
|
307
|
+
signature: 'TEST',
|
|
308
|
+
key_id: 'TEST',
|
|
309
|
+
});
|
|
295
310
|
await fetch(url);
|
|
296
311
|
} catch (err) {
|
|
297
312
|
console.error(err);
|
|
@@ -301,8 +316,8 @@ AdMob.addListener(RewardAdPluginEvents.Rewarded, async () => {
|
|
|
301
316
|
});
|
|
302
317
|
```
|
|
303
318
|
|
|
304
|
-
|
|
305
319
|
## Index
|
|
320
|
+
|
|
306
321
|
<docgen-index>
|
|
307
322
|
|
|
308
323
|
* [`initialize(...)`](#initialize)
|
|
@@ -338,6 +353,14 @@ AdMob.addListener(RewardAdPluginEvents.Rewarded, async () => {
|
|
|
338
353
|
* [`addListener(RewardAdPluginEvents.Dismissed, ...)`](#addlistenerrewardadplugineventsdismissed-)
|
|
339
354
|
* [`addListener(RewardAdPluginEvents.FailedToShow, ...)`](#addlistenerrewardadplugineventsfailedtoshow-)
|
|
340
355
|
* [`addListener(RewardAdPluginEvents.Showed, ...)`](#addlistenerrewardadplugineventsshowed-)
|
|
356
|
+
* [`prepareRewardInterstitialAd(...)`](#preparerewardinterstitialad)
|
|
357
|
+
* [`showRewardInterstitialAd()`](#showrewardinterstitialad)
|
|
358
|
+
* [`addListener(RewardInterstitialAdPluginEvents.FailedToLoad, ...)`](#addlistenerrewardinterstitialadplugineventsfailedtoload-)
|
|
359
|
+
* [`addListener(RewardInterstitialAdPluginEvents.Loaded, ...)`](#addlistenerrewardinterstitialadplugineventsloaded-)
|
|
360
|
+
* [`addListener(RewardInterstitialAdPluginEvents.Rewarded, ...)`](#addlistenerrewardinterstitialadplugineventsrewarded-)
|
|
361
|
+
* [`addListener(RewardInterstitialAdPluginEvents.Dismissed, ...)`](#addlistenerrewardinterstitialadplugineventsdismissed-)
|
|
362
|
+
* [`addListener(RewardInterstitialAdPluginEvents.FailedToShow, ...)`](#addlistenerrewardinterstitialadplugineventsfailedtoshow-)
|
|
363
|
+
* [`addListener(RewardInterstitialAdPluginEvents.Showed, ...)`](#addlistenerrewardinterstitialadplugineventsshowed-)
|
|
341
364
|
* [Interfaces](#interfaces)
|
|
342
365
|
* [Type Aliases](#type-aliases)
|
|
343
366
|
* [Enums](#enums)
|
|
@@ -345,13 +368,14 @@ AdMob.addListener(RewardAdPluginEvents.Rewarded, async () => {
|
|
|
345
368
|
</docgen-index>
|
|
346
369
|
|
|
347
370
|
## API
|
|
371
|
+
|
|
348
372
|
<docgen-api>
|
|
349
373
|
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
350
374
|
|
|
351
375
|
### initialize(...)
|
|
352
376
|
|
|
353
377
|
```typescript
|
|
354
|
-
initialize(options?: AdMobInitializationOptions) => Promise<void>
|
|
378
|
+
initialize(options?: AdMobInitializationOptions | undefined) => Promise<void>
|
|
355
379
|
```
|
|
356
380
|
|
|
357
381
|
Initialize AdMob with <a href="#admobinitializationoptions">AdMobInitializationOptions</a>
|
|
@@ -360,6 +384,8 @@ Initialize AdMob with <a href="#admobinitializationoptions">AdMobInitializationO
|
|
|
360
384
|
| ------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
|
361
385
|
| **`options`** | <code><a href="#admobinitializationoptions">AdMobInitializationOptions</a></code> | <a href="#admobinitializationoptions">AdMobInitializationOptions</a> |
|
|
362
386
|
|
|
387
|
+
**Since:** 1.1.2
|
|
388
|
+
|
|
363
389
|
--------------------
|
|
364
390
|
|
|
365
391
|
|
|
@@ -373,6 +399,8 @@ Confirm requestTrackingAuthorization status (iOS >14)
|
|
|
373
399
|
|
|
374
400
|
**Returns:** <code>Promise<<a href="#trackingauthorizationstatusinterface">TrackingAuthorizationStatusInterface</a>></code>
|
|
375
401
|
|
|
402
|
+
**Since:** 3.1.0
|
|
403
|
+
|
|
376
404
|
--------------------
|
|
377
405
|
|
|
378
406
|
|
|
@@ -385,6 +413,8 @@ requestTrackingAuthorization() => Promise<void>
|
|
|
385
413
|
request requestTrackingAuthorization (iOS >14).
|
|
386
414
|
This is deprecated method. We recommend UMP Consent.
|
|
387
415
|
|
|
416
|
+
**Since:** 5.2.0
|
|
417
|
+
|
|
388
418
|
--------------------
|
|
389
419
|
|
|
390
420
|
|
|
@@ -400,6 +430,8 @@ Report application mute state to AdMob SDK
|
|
|
400
430
|
| ------------- | --------------------------------------------------------------------------- |
|
|
401
431
|
| **`options`** | <code><a href="#applicationmutedoptions">ApplicationMutedOptions</a></code> |
|
|
402
432
|
|
|
433
|
+
**Since:** 4.1.1
|
|
434
|
+
|
|
403
435
|
--------------------
|
|
404
436
|
|
|
405
437
|
|
|
@@ -415,6 +447,8 @@ Report application volume to AdMob SDK
|
|
|
415
447
|
| ------------- | ----------------------------------------------------------------------------- |
|
|
416
448
|
| **`options`** | <code><a href="#applicationvolumeoptions">ApplicationVolumeOptions</a></code> |
|
|
417
449
|
|
|
450
|
+
**Since:** 4.1.1
|
|
451
|
+
|
|
418
452
|
--------------------
|
|
419
453
|
|
|
420
454
|
|
|
@@ -430,6 +464,8 @@ Show a banner Ad
|
|
|
430
464
|
| ------------- | ----------------------------------------------------------- | ---------------------------------- |
|
|
431
465
|
| **`options`** | <code><a href="#banneradoptions">BannerAdOptions</a></code> | <a href="#adoptions">AdOptions</a> |
|
|
432
466
|
|
|
467
|
+
**Since:** 1.1.2
|
|
468
|
+
|
|
433
469
|
--------------------
|
|
434
470
|
|
|
435
471
|
|
|
@@ -441,6 +477,8 @@ hideBanner() => Promise<void>
|
|
|
441
477
|
|
|
442
478
|
Hide the banner, remove it from screen, but can show it later
|
|
443
479
|
|
|
480
|
+
**Since:** 1.1.2
|
|
481
|
+
|
|
444
482
|
--------------------
|
|
445
483
|
|
|
446
484
|
|
|
@@ -452,6 +490,8 @@ resumeBanner() => Promise<void>
|
|
|
452
490
|
|
|
453
491
|
Resume the banner, show it after hide
|
|
454
492
|
|
|
493
|
+
**Since:** 1.1.2
|
|
494
|
+
|
|
455
495
|
--------------------
|
|
456
496
|
|
|
457
497
|
|
|
@@ -463,6 +503,8 @@ removeBanner() => Promise<void>
|
|
|
463
503
|
|
|
464
504
|
Destroy the banner, remove it from screen.
|
|
465
505
|
|
|
506
|
+
**Since:** 1.1.2
|
|
507
|
+
|
|
466
508
|
--------------------
|
|
467
509
|
|
|
468
510
|
|
|
@@ -479,6 +521,8 @@ addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: Ad
|
|
|
479
521
|
|
|
480
522
|
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
481
523
|
|
|
524
|
+
**Since:** 3.0.0
|
|
525
|
+
|
|
482
526
|
--------------------
|
|
483
527
|
|
|
484
528
|
|
|
@@ -497,6 +541,8 @@ Notice: request loaded Banner ad
|
|
|
497
541
|
|
|
498
542
|
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
499
543
|
|
|
544
|
+
**Since:** 3.0.0
|
|
545
|
+
|
|
500
546
|
--------------------
|
|
501
547
|
|
|
502
548
|
|
|
@@ -515,6 +561,8 @@ Notice: request failed Banner ad
|
|
|
515
561
|
|
|
516
562
|
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
517
563
|
|
|
564
|
+
**Since:** 3.0.0
|
|
565
|
+
|
|
518
566
|
--------------------
|
|
519
567
|
|
|
520
568
|
|
|
@@ -533,6 +581,8 @@ Notice: full-screen banner view will be presented in response to the user clicki
|
|
|
533
581
|
|
|
534
582
|
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
535
583
|
|
|
584
|
+
**Since:** 3.0.0
|
|
585
|
+
|
|
536
586
|
--------------------
|
|
537
587
|
|
|
538
588
|
|
|
@@ -551,6 +601,8 @@ Notice: The full-screen banner view will been dismissed.
|
|
|
551
601
|
|
|
552
602
|
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
553
603
|
|
|
604
|
+
**Since:** 3.0.0
|
|
605
|
+
|
|
554
606
|
--------------------
|
|
555
607
|
|
|
556
608
|
|
|
@@ -569,13 +621,15 @@ Unimplemented
|
|
|
569
621
|
|
|
570
622
|
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
571
623
|
|
|
624
|
+
**Since:** 3.0.0
|
|
625
|
+
|
|
572
626
|
--------------------
|
|
573
627
|
|
|
574
628
|
|
|
575
629
|
### requestConsentInfo(...)
|
|
576
630
|
|
|
577
631
|
```typescript
|
|
578
|
-
requestConsentInfo(options?: AdmobConsentRequestOptions) => Promise<AdmobConsentInfo>
|
|
632
|
+
requestConsentInfo(options?: AdmobConsentRequestOptions | undefined) => Promise<AdmobConsentInfo>
|
|
579
633
|
```
|
|
580
634
|
|
|
581
635
|
Request user consent information
|
|
@@ -586,6 +640,8 @@ Request user consent information
|
|
|
586
640
|
|
|
587
641
|
**Returns:** <code>Promise<<a href="#admobconsentinfo">AdmobConsentInfo</a>></code>
|
|
588
642
|
|
|
643
|
+
**Since:** 5.0.0
|
|
644
|
+
|
|
589
645
|
--------------------
|
|
590
646
|
|
|
591
647
|
|
|
@@ -599,6 +655,8 @@ Shows a google user consent form (rendered from your GDPR message config).
|
|
|
599
655
|
|
|
600
656
|
**Returns:** <code>Promise<<a href="#admobconsentinfo">AdmobConsentInfo</a>></code>
|
|
601
657
|
|
|
658
|
+
**Since:** 5.0.0
|
|
659
|
+
|
|
602
660
|
--------------------
|
|
603
661
|
|
|
604
662
|
|
|
@@ -610,6 +668,8 @@ resetConsentInfo() => Promise<void>
|
|
|
610
668
|
|
|
611
669
|
Resets the UMP SDK state. Call requestConsentInfo function again to allow user modify their consent
|
|
612
670
|
|
|
671
|
+
**Since:** 5.0.0
|
|
672
|
+
|
|
613
673
|
--------------------
|
|
614
674
|
|
|
615
675
|
|
|
@@ -627,6 +687,8 @@ Prepare interstitial banner
|
|
|
627
687
|
|
|
628
688
|
**Returns:** <code>Promise<<a href="#adloadinfo">AdLoadInfo</a>></code>
|
|
629
689
|
|
|
690
|
+
**Since:** 1.1.2
|
|
691
|
+
|
|
630
692
|
--------------------
|
|
631
693
|
|
|
632
694
|
|
|
@@ -638,6 +700,8 @@ showInterstitial() => Promise<void>
|
|
|
638
700
|
|
|
639
701
|
Show interstitial ad when it’s ready
|
|
640
702
|
|
|
703
|
+
**Since:** 1.1.2
|
|
704
|
+
|
|
641
705
|
--------------------
|
|
642
706
|
|
|
643
707
|
|
|
@@ -735,6 +799,8 @@ Prepare a reward video ad
|
|
|
735
799
|
|
|
736
800
|
**Returns:** <code>Promise<<a href="#adloadinfo">AdLoadInfo</a>></code>
|
|
737
801
|
|
|
802
|
+
**Since:** 1.1.2
|
|
803
|
+
|
|
738
804
|
--------------------
|
|
739
805
|
|
|
740
806
|
|
|
@@ -748,6 +814,8 @@ Show a reward video ad
|
|
|
748
814
|
|
|
749
815
|
**Returns:** <code>Promise<<a href="#admobrewarditem">AdMobRewardItem</a>></code>
|
|
750
816
|
|
|
817
|
+
**Since:** 1.1.2
|
|
818
|
+
|
|
751
819
|
--------------------
|
|
752
820
|
|
|
753
821
|
|
|
@@ -847,18 +915,148 @@ addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) =>
|
|
|
847
915
|
--------------------
|
|
848
916
|
|
|
849
917
|
|
|
918
|
+
### prepareRewardInterstitialAd(...)
|
|
919
|
+
|
|
920
|
+
```typescript
|
|
921
|
+
prepareRewardInterstitialAd(options: RewardInterstitialAdOptions) => Promise<AdLoadInfo>
|
|
922
|
+
```
|
|
923
|
+
|
|
924
|
+
Prepare a reward video ad
|
|
925
|
+
|
|
926
|
+
| Param | Type | Description |
|
|
927
|
+
| ------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------- |
|
|
928
|
+
| **`options`** | <code><a href="#rewardinterstitialadoptions">RewardInterstitialAdOptions</a></code> | <a href="#rewardadoptions">RewardAdOptions</a> |
|
|
929
|
+
|
|
930
|
+
**Returns:** <code>Promise<<a href="#adloadinfo">AdLoadInfo</a>></code>
|
|
931
|
+
|
|
932
|
+
**Since:** 1.1.2
|
|
933
|
+
|
|
934
|
+
--------------------
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
### showRewardInterstitialAd()
|
|
938
|
+
|
|
939
|
+
```typescript
|
|
940
|
+
showRewardInterstitialAd() => Promise<AdMobRewardInterstitialItem>
|
|
941
|
+
```
|
|
942
|
+
|
|
943
|
+
Show a reward video ad
|
|
944
|
+
|
|
945
|
+
**Returns:** <code>Promise<<a href="#admobrewardinterstitialitem">AdMobRewardInterstitialItem</a>></code>
|
|
946
|
+
|
|
947
|
+
**Since:** 1.1.2
|
|
948
|
+
|
|
949
|
+
--------------------
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
### addListener(RewardInterstitialAdPluginEvents.FailedToLoad, ...)
|
|
953
|
+
|
|
954
|
+
```typescript
|
|
955
|
+
addListener(eventName: RewardInterstitialAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
|
|
956
|
+
```
|
|
957
|
+
|
|
958
|
+
| Param | Type |
|
|
959
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------------- |
|
|
960
|
+
| **`eventName`** | <code><a href="#rewardinterstitialadpluginevents">RewardInterstitialAdPluginEvents.FailedToLoad</a></code> |
|
|
961
|
+
| **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) => void</code> |
|
|
962
|
+
|
|
963
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
964
|
+
|
|
965
|
+
--------------------
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
### addListener(RewardInterstitialAdPluginEvents.Loaded, ...)
|
|
969
|
+
|
|
970
|
+
```typescript
|
|
971
|
+
addListener(eventName: RewardInterstitialAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void) => Promise<PluginListenerHandle>
|
|
972
|
+
```
|
|
973
|
+
|
|
974
|
+
| Param | Type |
|
|
975
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------- |
|
|
976
|
+
| **`eventName`** | <code><a href="#rewardinterstitialadpluginevents">RewardInterstitialAdPluginEvents.Loaded</a></code> |
|
|
977
|
+
| **`listenerFunc`** | <code>(info: <a href="#adloadinfo">AdLoadInfo</a>) => void</code> |
|
|
978
|
+
|
|
979
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
980
|
+
|
|
981
|
+
--------------------
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
### addListener(RewardInterstitialAdPluginEvents.Rewarded, ...)
|
|
985
|
+
|
|
986
|
+
```typescript
|
|
987
|
+
addListener(eventName: RewardInterstitialAdPluginEvents.Rewarded, listenerFunc: (reward: AdMobRewardInterstitialItem) => void) => Promise<PluginListenerHandle>
|
|
988
|
+
```
|
|
989
|
+
|
|
990
|
+
| Param | Type |
|
|
991
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------- |
|
|
992
|
+
| **`eventName`** | <code><a href="#rewardinterstitialadpluginevents">RewardInterstitialAdPluginEvents.Rewarded</a></code> |
|
|
993
|
+
| **`listenerFunc`** | <code>(reward: <a href="#admobrewardinterstitialitem">AdMobRewardInterstitialItem</a>) => void</code> |
|
|
994
|
+
|
|
995
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
996
|
+
|
|
997
|
+
--------------------
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
### addListener(RewardInterstitialAdPluginEvents.Dismissed, ...)
|
|
1001
|
+
|
|
1002
|
+
```typescript
|
|
1003
|
+
addListener(eventName: RewardInterstitialAdPluginEvents.Dismissed, listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
1004
|
+
```
|
|
1005
|
+
|
|
1006
|
+
| Param | Type |
|
|
1007
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------- |
|
|
1008
|
+
| **`eventName`** | <code><a href="#rewardinterstitialadpluginevents">RewardInterstitialAdPluginEvents.Dismissed</a></code> |
|
|
1009
|
+
| **`listenerFunc`** | <code>() => void</code> |
|
|
1010
|
+
|
|
1011
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
1012
|
+
|
|
1013
|
+
--------------------
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
### addListener(RewardInterstitialAdPluginEvents.FailedToShow, ...)
|
|
1017
|
+
|
|
1018
|
+
```typescript
|
|
1019
|
+
addListener(eventName: RewardInterstitialAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void) => Promise<PluginListenerHandle>
|
|
1020
|
+
```
|
|
1021
|
+
|
|
1022
|
+
| Param | Type |
|
|
1023
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------------- |
|
|
1024
|
+
| **`eventName`** | <code><a href="#rewardinterstitialadpluginevents">RewardInterstitialAdPluginEvents.FailedToShow</a></code> |
|
|
1025
|
+
| **`listenerFunc`** | <code>(error: <a href="#admoberror">AdMobError</a>) => void</code> |
|
|
1026
|
+
|
|
1027
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
1028
|
+
|
|
1029
|
+
--------------------
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
### addListener(RewardInterstitialAdPluginEvents.Showed, ...)
|
|
1033
|
+
|
|
1034
|
+
```typescript
|
|
1035
|
+
addListener(eventName: RewardInterstitialAdPluginEvents.Showed, listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
1036
|
+
```
|
|
1037
|
+
|
|
1038
|
+
| Param | Type |
|
|
1039
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------- |
|
|
1040
|
+
| **`eventName`** | <code><a href="#rewardinterstitialadpluginevents">RewardInterstitialAdPluginEvents.Showed</a></code> |
|
|
1041
|
+
| **`listenerFunc`** | <code>() => void</code> |
|
|
1042
|
+
|
|
1043
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
1044
|
+
|
|
1045
|
+
--------------------
|
|
1046
|
+
|
|
1047
|
+
|
|
850
1048
|
### Interfaces
|
|
851
1049
|
|
|
852
1050
|
|
|
853
1051
|
#### AdMobInitializationOptions
|
|
854
1052
|
|
|
855
|
-
| Prop | Type | Description |
|
|
856
|
-
| ---------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
857
|
-
| **`testingDevices`** | <code>string[]</code> | An Array of devices IDs that will be marked as tested devices if {@link <a href="#admobinitializationoptions">AdMobInitializationOptions.initializeForTesting</a>} is true (Real Ads will be served to Testing devices, but they will not count as 'real'). |
|
|
858
|
-
| **`initializeForTesting`** | <code>boolean</code> | If set to true, the devices on {@link <a href="#admobinitializationoptions">AdMobInitializationOptions.testingDevices</a>} will be registered to receive test production ads. |
|
|
859
|
-
| **`tagForChildDirectedTreatment`** | <code>boolean</code> | For purposes of the Children's Online Privacy Protection Act (COPPA), there is a setting called tagForChildDirectedTreatment. |
|
|
860
|
-
| **`tagForUnderAgeOfConsent`** | <code>boolean</code> | When using this feature, a Tag For Users under the Age of Consent in Europe (TFUA) parameter will be included in all future ad requests. |
|
|
861
|
-
| **`maxAdContentRating`** | <code><a href="#maxadcontentrating">MaxAdContentRating</a></code> | As an app developer, you can indicate whether you want Google to treat your content as child-directed when you make an ad request. |
|
|
1053
|
+
| Prop | Type | Description | Default | Since |
|
|
1054
|
+
| ---------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- |
|
|
1055
|
+
| **`testingDevices`** | <code>string[]</code> | An Array of devices IDs that will be marked as tested devices if {@link <a href="#admobinitializationoptions">AdMobInitializationOptions.initializeForTesting</a>} is true (Real Ads will be served to Testing devices, but they will not count as 'real'). | | 1.2.0 |
|
|
1056
|
+
| **`initializeForTesting`** | <code>boolean</code> | If set to true, the devices on {@link <a href="#admobinitializationoptions">AdMobInitializationOptions.testingDevices</a>} will be registered to receive test production ads. | <code>false</code> | 1.2.0 |
|
|
1057
|
+
| **`tagForChildDirectedTreatment`** | <code>boolean</code> | For purposes of the Children's Online Privacy Protection Act (COPPA), there is a setting called tagForChildDirectedTreatment. | | 3.1.0 |
|
|
1058
|
+
| **`tagForUnderAgeOfConsent`** | <code>boolean</code> | When using this feature, a Tag For Users under the Age of Consent in Europe (TFUA) parameter will be included in all future ad requests. | | 3.1.0 |
|
|
1059
|
+
| **`maxAdContentRating`** | <code><a href="#maxadcontentrating">MaxAdContentRating</a></code> | As an app developer, you can indicate whether you want Google to treat your content as child-directed when you make an ad request. | | 3.1.0 |
|
|
862
1060
|
|
|
863
1061
|
|
|
864
1062
|
#### TrackingAuthorizationStatusInterface
|
|
@@ -870,26 +1068,26 @@ addListener(eventName: RewardAdPluginEvents.Showed, listenerFunc: () => void) =>
|
|
|
870
1068
|
|
|
871
1069
|
#### ApplicationMutedOptions
|
|
872
1070
|
|
|
873
|
-
| Prop | Type | Description |
|
|
874
|
-
| ----------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
875
|
-
| **`muted`** | <code>boolean</code> | To inform the SDK that the app volume has been muted. Note: Video ads that are ineligible to be shown with muted audio are not returned for ad requests made, when the app volume is reported as muted or set to a value of 0. This may restrict a subset of the broader video ads pool from serving. |
|
|
1071
|
+
| Prop | Type | Description | Since |
|
|
1072
|
+
| ----------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
|
|
1073
|
+
| **`muted`** | <code>boolean</code> | To inform the SDK that the app volume has been muted. Note: Video ads that are ineligible to be shown with muted audio are not returned for ad requests made, when the app volume is reported as muted or set to a value of 0. This may restrict a subset of the broader video ads pool from serving. | 4.1.1 |
|
|
876
1074
|
|
|
877
1075
|
|
|
878
1076
|
#### ApplicationVolumeOptions
|
|
879
1077
|
|
|
880
|
-
| Prop | Type | Description |
|
|
881
|
-
| ------------ | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
882
|
-
| **`volume`** | <code>0 \| 1 \| 0.1 \| 0.2 \| 0.3 \| 0.4 \| 0.5 \| 0.6 \| 0.7 \| 0.8 \| 0.9</code> | If your app has its own volume controls (such as custom music or sound effect volumes), disclosing app volume to the Google Mobile Ads SDK allows video ads to respect app volume settings. enable set 0.0 - 1.0, any float allowed. |
|
|
1078
|
+
| Prop | Type | Description | Since |
|
|
1079
|
+
| ------------ | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----- |
|
|
1080
|
+
| **`volume`** | <code>0 \| 1 \| 0.1 \| 0.2 \| 0.3 \| 0.4 \| 0.5 \| 0.6 \| 0.7 \| 0.8 \| 0.9</code> | If your app has its own volume controls (such as custom music or sound effect volumes), disclosing app volume to the Google Mobile Ads SDK allows video ads to respect app volume settings. enable set 0.0 - 1.0, any float allowed. | 4.1.1 |
|
|
883
1081
|
|
|
884
1082
|
|
|
885
1083
|
#### BannerAdOptions
|
|
886
1084
|
|
|
887
1085
|
This interface extends <a href="#adoptions">AdOptions</a>
|
|
888
1086
|
|
|
889
|
-
| Prop | Type | Description |
|
|
890
|
-
| -------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
891
|
-
| **`adSize`** | <code><a href="#banneradsize">BannerAdSize</a></code> | Banner Ad Size, defaults to ADAPTIVE_BANNER. IT can be: ADAPTIVE_BANNER, SMART_BANNER, BANNER, MEDIUM_RECTANGLE, FULL_BANNER, LEADERBOARD |
|
|
892
|
-
| **`position`** | <code><a href="#banneradposition">BannerAdPosition</a></code> | Set Banner Ad position. TOP_CENTER or CENTER or BOTTOM_CENTER |
|
|
1087
|
+
| Prop | Type | Description | Default | Since |
|
|
1088
|
+
| -------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | ----- |
|
|
1089
|
+
| **`adSize`** | <code><a href="#banneradsize">BannerAdSize</a></code> | Banner Ad Size, defaults to ADAPTIVE_BANNER. IT can be: ADAPTIVE_BANNER, SMART_BANNER, BANNER, MEDIUM_RECTANGLE, FULL_BANNER, LEADERBOARD | <code>ADAPTIVE_BANNER</code> | 3.0.0 |
|
|
1090
|
+
| **`position`** | <code><a href="#banneradposition">BannerAdPosition</a></code> | Set Banner Ad position. TOP_CENTER or CENTER or BOTTOM_CENTER | <code>TOP_CENTER</code> | 1.1.2 |
|
|
893
1091
|
|
|
894
1092
|
|
|
895
1093
|
#### PluginListenerHandle
|
|
@@ -922,19 +1120,19 @@ https://developers.google.com/android/reference/com/google/android/gms/ads/AdErr
|
|
|
922
1120
|
|
|
923
1121
|
#### AdmobConsentInfo
|
|
924
1122
|
|
|
925
|
-
| Prop | Type | Description |
|
|
926
|
-
| ---------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------- |
|
|
927
|
-
| **`status`** | <code><a href="#admobconsentstatus">AdmobConsentStatus</a></code> | The consent status of the user. |
|
|
928
|
-
| **`isConsentFormAvailable`** | <code>boolean</code> | If `true` a consent form is available and vice versa. |
|
|
1123
|
+
| Prop | Type | Description | Since |
|
|
1124
|
+
| ---------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------- | ----- |
|
|
1125
|
+
| **`status`** | <code><a href="#admobconsentstatus">AdmobConsentStatus</a></code> | The consent status of the user. | 5.0.0 |
|
|
1126
|
+
| **`isConsentFormAvailable`** | <code>boolean</code> | If `true` a consent form is available and vice versa. | 5.0.0 |
|
|
929
1127
|
|
|
930
1128
|
|
|
931
1129
|
#### AdmobConsentRequestOptions
|
|
932
1130
|
|
|
933
|
-
| Prop | Type | Description |
|
|
934
|
-
| ----------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
935
|
-
| **`debugGeography`** | <code><a href="#admobconsentdebuggeography">AdmobConsentDebugGeography</a></code> | Sets the debug geography to test the consent locally. |
|
|
936
|
-
| **`testDeviceIdentifiers`** | <code>string[]</code> | An array of test device IDs to allow. Note: On iOS, the ID may renew if you uninstall and reinstall the app. |
|
|
937
|
-
| **`tagForUnderAgeOfConsent`** | <code>boolean</code> | Set to `true` to provide the option for the user to accept being shown personalized ads. |
|
|
1131
|
+
| Prop | Type | Description | Default | Since |
|
|
1132
|
+
| ----------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------ | ----- |
|
|
1133
|
+
| **`debugGeography`** | <code><a href="#admobconsentdebuggeography">AdmobConsentDebugGeography</a></code> | Sets the debug geography to test the consent locally. | | 5.0.0 |
|
|
1134
|
+
| **`testDeviceIdentifiers`** | <code>string[]</code> | An array of test device IDs to allow. Note: On iOS, the ID may renew if you uninstall and reinstall the app. | | 5.0.0 |
|
|
1135
|
+
| **`tagForUnderAgeOfConsent`** | <code>boolean</code> | Set to `true` to provide the option for the user to accept being shown personalized ads. | <code>false</code> | 5.0.0 |
|
|
938
1136
|
|
|
939
1137
|
|
|
940
1138
|
#### AdLoadInfo
|
|
@@ -946,12 +1144,12 @@ https://developers.google.com/android/reference/com/google/android/gms/ads/AdErr
|
|
|
946
1144
|
|
|
947
1145
|
#### AdOptions
|
|
948
1146
|
|
|
949
|
-
| Prop | Type | Description |
|
|
950
|
-
| --------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
951
|
-
| **`adId`** | <code>string</code> | The ad unit ID that you want to request |
|
|
952
|
-
| **`isTesting`** | <code>boolean</code> | You can use test mode of ad. |
|
|
953
|
-
| **`margin`** | <code>number</code> | Margin Banner. Default is 0px; If position is BOTTOM_CENTER, margin is be margin-bottom. If position is TOP_CENTER, margin is be margin-top. |
|
|
954
|
-
| **`npa`** | <code>boolean</code> | The default behavior of the Google Mobile Ads SDK is to serve personalized ads. Set this to true to request Non-Personalized Ads |
|
|
1147
|
+
| Prop | Type | Description | Default | Since |
|
|
1148
|
+
| --------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- |
|
|
1149
|
+
| **`adId`** | <code>string</code> | The ad unit ID that you want to request | | 1.1.2 |
|
|
1150
|
+
| **`isTesting`** | <code>boolean</code> | You can use test mode of ad. | <code>false</code> | 1.1.2 |
|
|
1151
|
+
| **`margin`** | <code>number</code> | Margin Banner. Default is 0px; If position is BOTTOM_CENTER, margin is be margin-bottom. If position is TOP_CENTER, margin is be margin-top. | <code>0</code> | 1.1.2 |
|
|
1152
|
+
| **`npa`** | <code>boolean</code> | The default behavior of the Google Mobile Ads SDK is to serve personalized ads. Set this to true to request Non-Personalized Ads | <code>false</code> | 1.2.0 |
|
|
955
1153
|
|
|
956
1154
|
|
|
957
1155
|
#### RewardAdOptions
|
|
@@ -972,6 +1170,24 @@ https://developers.google.com/admob/android/rewarded-video-adapters?hl=en
|
|
|
972
1170
|
| **`amount`** | <code>number</code> | Rewarded amount user got |
|
|
973
1171
|
|
|
974
1172
|
|
|
1173
|
+
#### RewardInterstitialAdOptions
|
|
1174
|
+
|
|
1175
|
+
| Prop | Type | Description |
|
|
1176
|
+
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1177
|
+
| **`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. |
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
#### AdMobRewardInterstitialItem
|
|
1181
|
+
|
|
1182
|
+
For more information
|
|
1183
|
+
https://developers.google.com/admob/android/rewarded-video-adapters?hl=en
|
|
1184
|
+
|
|
1185
|
+
| Prop | Type | Description |
|
|
1186
|
+
| ------------ | ------------------- | ------------------------ |
|
|
1187
|
+
| **`type`** | <code>string</code> | Rewarded type user got |
|
|
1188
|
+
| **`amount`** | <code>number</code> | Rewarded amount user got |
|
|
1189
|
+
|
|
1190
|
+
|
|
975
1191
|
### Type Aliases
|
|
976
1192
|
|
|
977
1193
|
|
|
@@ -1075,6 +1291,18 @@ From T, pick a set of properties whose keys are in the union K
|
|
|
1075
1291
|
| **`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. |
|
|
1076
1292
|
| **`Rewarded`** | <code>'onRewardedVideoAdReward'</code> | Emits when user get rewarded from AdReward |
|
|
1077
1293
|
|
|
1294
|
+
|
|
1295
|
+
#### RewardInterstitialAdPluginEvents
|
|
1296
|
+
|
|
1297
|
+
| Members | Value | Description |
|
|
1298
|
+
| ------------------ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1299
|
+
| **`Loaded`** | <code>'onRewardedInterstitialAdLoaded'</code> | Emits after trying to prepare a RewardAd and the Video is loaded and ready to be show |
|
|
1300
|
+
| **`FailedToLoad`** | <code>'onRewardedInterstitialAdFailedToLoad'</code> | Emits after trying to prepare a RewardAd when it could not be loaded |
|
|
1301
|
+
| **`Showed`** | <code>'onRewardedInterstitialAdShowed'</code> | Emits when the AdReward video is visible to the user |
|
|
1302
|
+
| **`FailedToShow`** | <code>'onRewardedInterstitialAdFailedToShow'</code> | Emits when the AdReward video is failed to show |
|
|
1303
|
+
| **`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. |
|
|
1304
|
+
| **`Rewarded`** | <code>'onRewardedInterstitialAdReward'</code> | Emits when user get rewarded from AdReward |
|
|
1305
|
+
|
|
1078
1306
|
</docgen-api>
|
|
1079
1307
|
|
|
1080
1308
|
## TROUBLE SHOOTING
|