@capgo/capacitor-admob 8.1.20 → 8.2.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/CapgoCapacitorAdmob.podspec +1 -0
- package/Package.swift +4 -2
- package/README.md +348 -10
- package/android/build.gradle +3 -2
- package/android/src/main/kotlin/admob/plus/capacitor/AdMobPlusPlugin.kt +121 -0
- package/android/src/main/kotlin/admob/plus/capacitor/ConsentHelper.kt +140 -0
- package/android/src/main/kotlin/admob/plus/capacitor/Generated.kt +7 -0
- package/android/src/main/kotlin/admob/plus/capacitor/feed/FeedAdManager.kt +512 -0
- package/android/src/main/kotlin/admob/plus/core/Ad.kt +2 -4
- package/android/src/main/kotlin/admob/plus/core/Helper.kt +18 -1
- package/dist/docs.json +543 -5
- package/dist/esm/definitions.d.ts +284 -1
- package/dist/esm/definitions.js +55 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/events.d.ts +127 -0
- package/dist/esm/events.js +50 -0
- package/dist/esm/events.js.map +1 -0
- package/dist/esm/feed-ad.d.ts +32 -0
- package/dist/esm/feed-ad.js +133 -0
- package/dist/esm/feed-ad.js.map +1 -0
- package/dist/esm/index.d.ts +4 -2
- package/dist/esm/index.js +4 -32
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/plugin-instance.d.ts +3 -0
- package/dist/esm/plugin-instance.js +35 -0
- package/dist/esm/plugin-instance.js.map +1 -0
- package/dist/esm/web.d.ts +11 -1
- package/dist/esm/web.js +40 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +313 -31
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +313 -31
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/AdmobPlusPlugin/AdmobPlusPlugin.swift +131 -1
- package/ios/Sources/AdmobPlusPlugin/BannerAd.swift +6 -9
- package/ios/Sources/AdmobPlusPlugin/ConsentExecutor.swift +100 -0
- package/ios/Sources/AdmobPlusPlugin/FeedAdManager.swift +435 -0
- package/ios/Sources/AdmobPlusPlugin/Generated.swift +7 -0
- package/ios/Sources/AdmobPlusPlugin/Helper.swift +29 -0
- package/ios/Sources/AdmobPlusPlugin/InterstitialAd.swift +7 -13
- package/ios/Sources/AdmobPlusPlugin/RewardedAd.swift +13 -20
- package/ios/Sources/AdmobPlusPlugin/RewardedInterstitialAd.swift +13 -20
- package/ios/Tests/AdmobPlusPluginTests/AdmobPlusPluginTests.swift +3 -6
- package/package.json +2 -2
|
@@ -2,6 +2,7 @@ package admob.plus.core
|
|
|
2
2
|
|
|
3
3
|
import android.annotation.SuppressLint
|
|
4
4
|
import android.app.Activity
|
|
5
|
+
import android.os.Build
|
|
5
6
|
import android.content.res.Resources
|
|
6
7
|
import android.provider.Settings
|
|
7
8
|
import android.util.DisplayMetrics
|
|
@@ -27,7 +28,11 @@ class Helper(private val adapter: Adapter) {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
fun configForTestLab() {
|
|
30
|
-
|
|
31
|
+
configureTestAdsIfNeeded()
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
fun configureTestAdsIfNeeded() {
|
|
35
|
+
if (!isRunningInTestLab && !isEmulator()) {
|
|
31
36
|
return
|
|
32
37
|
}
|
|
33
38
|
val config = MobileAds.getRequestConfiguration()
|
|
@@ -46,6 +51,18 @@ class Helper(private val adapter: Adapter) {
|
|
|
46
51
|
MobileAds.setRequestConfiguration(builder.build())
|
|
47
52
|
}
|
|
48
53
|
|
|
54
|
+
private fun isEmulator(): Boolean {
|
|
55
|
+
return Build.FINGERPRINT.startsWith("generic")
|
|
56
|
+
|| Build.FINGERPRINT.startsWith("unknown")
|
|
57
|
+
|| Build.MODEL.contains("google_sdk")
|
|
58
|
+
|| Build.MODEL.contains("Emulator")
|
|
59
|
+
|| Build.MODEL.contains("Android SDK built for x86")
|
|
60
|
+
|| Build.MANUFACTURER.contains("Genymotion")
|
|
61
|
+
|| Build.HARDWARE.contains("goldfish")
|
|
62
|
+
|| Build.HARDWARE.contains("ranchu")
|
|
63
|
+
|| Build.PRODUCT.contains("sdk")
|
|
64
|
+
}
|
|
65
|
+
|
|
49
66
|
private val deviceId: String
|
|
50
67
|
private get() {
|
|
51
68
|
// This will request test ads on the emulator and device by passing this hashed device ID.
|
package/dist/docs.json
CHANGED
|
@@ -115,6 +115,102 @@
|
|
|
115
115
|
],
|
|
116
116
|
"slug": "configrequest"
|
|
117
117
|
},
|
|
118
|
+
{
|
|
119
|
+
"name": "requestConsentInfo",
|
|
120
|
+
"signature": "(options?: AdmobConsentRequestOptions | undefined) => Promise<AdmobConsentInfo>",
|
|
121
|
+
"parameters": [
|
|
122
|
+
{
|
|
123
|
+
"name": "options",
|
|
124
|
+
"docs": "- Optional consent request options for debugging and tagging",
|
|
125
|
+
"type": "AdmobConsentRequestOptions | undefined"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"returns": "Promise<AdmobConsentInfo>",
|
|
129
|
+
"tags": [
|
|
130
|
+
{
|
|
131
|
+
"name": "param",
|
|
132
|
+
"text": "options - Optional consent request options for debugging and tagging"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "returns",
|
|
136
|
+
"text": "Promise that resolves with the current consent information"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "throws",
|
|
140
|
+
"text": "Error if the consent info request fails"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "since",
|
|
144
|
+
"text": "8.2.0"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "example",
|
|
148
|
+
"text": "```typescript\nconst consentInfo = await AdMob.requestConsentInfo();\nif (consentInfo.isConsentFormAvailable && consentInfo.status === AdmobConsentStatus.REQUIRED) {\n await AdMob.showConsentForm();\n}\n```"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"docs": "Request user consent information from Google's User Messaging Platform (UMP).\n\nCall this after `start()` and before loading ads for users in the EEA/UK.",
|
|
152
|
+
"complexTypes": [
|
|
153
|
+
"AdmobConsentInfo",
|
|
154
|
+
"AdmobConsentRequestOptions"
|
|
155
|
+
],
|
|
156
|
+
"slug": "requestconsentinfo"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "showConsentForm",
|
|
160
|
+
"signature": "() => Promise<AdmobConsentInfo>",
|
|
161
|
+
"parameters": [],
|
|
162
|
+
"returns": "Promise<AdmobConsentInfo>",
|
|
163
|
+
"tags": [
|
|
164
|
+
{
|
|
165
|
+
"name": "returns",
|
|
166
|
+
"text": "Promise that resolves with updated consent information after the form is dismissed"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "throws",
|
|
170
|
+
"text": "Error if the consent form cannot be shown"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "since",
|
|
174
|
+
"text": "8.2.0"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "example",
|
|
178
|
+
"text": "```typescript\nconst consentInfo = await AdMob.showConsentForm();\nif (!consentInfo.canRequestAds) {\n return;\n}\n```"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"docs": "Shows the Google user consent form rendered from your GDPR message configuration.",
|
|
182
|
+
"complexTypes": [
|
|
183
|
+
"AdmobConsentInfo"
|
|
184
|
+
],
|
|
185
|
+
"slug": "showconsentform"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "showPrivacyOptionsForm",
|
|
189
|
+
"signature": "() => Promise<void>",
|
|
190
|
+
"parameters": [],
|
|
191
|
+
"returns": "Promise<void>",
|
|
192
|
+
"tags": [
|
|
193
|
+
{
|
|
194
|
+
"name": "returns",
|
|
195
|
+
"text": "Promise that resolves when the form is dismissed"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "throws",
|
|
199
|
+
"text": "Error if the privacy options form cannot be shown"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "since",
|
|
203
|
+
"text": "8.2.0"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"name": "example",
|
|
207
|
+
"text": "```typescript\nawait AdMob.showPrivacyOptionsForm();\n```"
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"docs": "Shows the Google privacy options form rendered from your GDPR message configuration.\n\nUse this when your privacy message requires an in-app entry point for users to manage choices.",
|
|
211
|
+
"complexTypes": [],
|
|
212
|
+
"slug": "showprivacyoptionsform"
|
|
213
|
+
},
|
|
118
214
|
{
|
|
119
215
|
"name": "adCreate",
|
|
120
216
|
"signature": "<O extends MobileAdOptions>(opts: O) => Promise<void>",
|
|
@@ -303,6 +399,168 @@
|
|
|
303
399
|
"complexTypes": [],
|
|
304
400
|
"slug": "adhide"
|
|
305
401
|
},
|
|
402
|
+
{
|
|
403
|
+
"name": "feedAdCreate",
|
|
404
|
+
"signature": "(opts: FeedAdCreateOptions) => Promise<{ id: number; }>",
|
|
405
|
+
"parameters": [
|
|
406
|
+
{
|
|
407
|
+
"name": "opts",
|
|
408
|
+
"docs": "- Feed ad configuration",
|
|
409
|
+
"type": "FeedAdCreateOptions"
|
|
410
|
+
}
|
|
411
|
+
],
|
|
412
|
+
"returns": "Promise<{ id: number; }>",
|
|
413
|
+
"tags": [
|
|
414
|
+
{
|
|
415
|
+
"name": "param",
|
|
416
|
+
"text": "opts - Feed ad configuration"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"name": "returns",
|
|
420
|
+
"text": "Promise that resolves with the feed ad instance id"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"name": "since",
|
|
424
|
+
"text": "8.3.0"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "example",
|
|
428
|
+
"text": "```typescript\nconst { id } = await AdMob.feedAdCreate({\n format: 'native',\n adUnitId: 'ca-app-pub-3940256099942544/2247696110',\n positionKey: 'feed-3',\n autoRefreshMs: 60000,\n});\n```"
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
"docs": "Create an in-feed ad slot (native overlay or inline banner overlay).",
|
|
432
|
+
"complexTypes": [
|
|
433
|
+
"FeedAdCreateOptions"
|
|
434
|
+
],
|
|
435
|
+
"slug": "feedadcreate"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "feedAdDestroy",
|
|
439
|
+
"signature": "(opts: { id: number; }) => Promise<void>",
|
|
440
|
+
"parameters": [
|
|
441
|
+
{
|
|
442
|
+
"name": "opts",
|
|
443
|
+
"docs": "- Object containing the feed ad id",
|
|
444
|
+
"type": "{ id: number; }"
|
|
445
|
+
}
|
|
446
|
+
],
|
|
447
|
+
"returns": "Promise<void>",
|
|
448
|
+
"tags": [
|
|
449
|
+
{
|
|
450
|
+
"name": "param",
|
|
451
|
+
"text": "opts - Object containing the feed ad id"
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"name": "since",
|
|
455
|
+
"text": "8.3.0"
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
"docs": "Destroy a feed ad instance and remove its native overlay.",
|
|
459
|
+
"complexTypes": [],
|
|
460
|
+
"slug": "feedaddestroy"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"name": "feedAdLoad",
|
|
464
|
+
"signature": "(opts: { id: number; }) => Promise<void>",
|
|
465
|
+
"parameters": [
|
|
466
|
+
{
|
|
467
|
+
"name": "opts",
|
|
468
|
+
"docs": "- Object containing the feed ad id",
|
|
469
|
+
"type": "{ id: number; }"
|
|
470
|
+
}
|
|
471
|
+
],
|
|
472
|
+
"returns": "Promise<void>",
|
|
473
|
+
"tags": [
|
|
474
|
+
{
|
|
475
|
+
"name": "param",
|
|
476
|
+
"text": "opts - Object containing the feed ad id"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"name": "since",
|
|
480
|
+
"text": "8.3.0"
|
|
481
|
+
}
|
|
482
|
+
],
|
|
483
|
+
"docs": "Load or reload the feed ad. Listen for `feed.load` / `feed.loadfail` events.",
|
|
484
|
+
"complexTypes": [],
|
|
485
|
+
"slug": "feedadload"
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"name": "feedAdIsLoaded",
|
|
489
|
+
"signature": "(opts: { id: number; }) => Promise<boolean>",
|
|
490
|
+
"parameters": [
|
|
491
|
+
{
|
|
492
|
+
"name": "opts",
|
|
493
|
+
"docs": "- Object containing the feed ad id",
|
|
494
|
+
"type": "{ id: number; }"
|
|
495
|
+
}
|
|
496
|
+
],
|
|
497
|
+
"returns": "Promise<boolean>",
|
|
498
|
+
"tags": [
|
|
499
|
+
{
|
|
500
|
+
"name": "param",
|
|
501
|
+
"text": "opts - Object containing the feed ad id"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "since",
|
|
505
|
+
"text": "8.3.0"
|
|
506
|
+
}
|
|
507
|
+
],
|
|
508
|
+
"docs": "Whether the feed ad has finished loading.",
|
|
509
|
+
"complexTypes": [],
|
|
510
|
+
"slug": "feedadisloaded"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"name": "feedAdUpdateBounds",
|
|
514
|
+
"signature": "(opts: FeedAdBounds & { id: number; }) => Promise<void>",
|
|
515
|
+
"parameters": [
|
|
516
|
+
{
|
|
517
|
+
"name": "opts",
|
|
518
|
+
"docs": "- Feed ad id and bounds from `element.getBoundingClientRect()`",
|
|
519
|
+
"type": "FeedAdBounds & { id: number; }"
|
|
520
|
+
}
|
|
521
|
+
],
|
|
522
|
+
"returns": "Promise<void>",
|
|
523
|
+
"tags": [
|
|
524
|
+
{
|
|
525
|
+
"name": "param",
|
|
526
|
+
"text": "opts - Feed ad id and bounds from `element.getBoundingClientRect()`"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"name": "since",
|
|
530
|
+
"text": "8.3.0"
|
|
531
|
+
}
|
|
532
|
+
],
|
|
533
|
+
"docs": "Position the native overlay over an HTML placeholder. Call on scroll, resize, and orientation changes.",
|
|
534
|
+
"complexTypes": [
|
|
535
|
+
"FeedAdBounds"
|
|
536
|
+
],
|
|
537
|
+
"slug": "feedadupdatebounds"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"name": "feedAdSetAutoRefresh",
|
|
541
|
+
"signature": "(opts: { id: number; autoRefreshMs: number | null; }) => Promise<void>",
|
|
542
|
+
"parameters": [
|
|
543
|
+
{
|
|
544
|
+
"name": "opts",
|
|
545
|
+
"docs": "- Feed ad id and interval in ms, or `null` to disable",
|
|
546
|
+
"type": "{ id: number; autoRefreshMs: number | null; }"
|
|
547
|
+
}
|
|
548
|
+
],
|
|
549
|
+
"returns": "Promise<void>",
|
|
550
|
+
"tags": [
|
|
551
|
+
{
|
|
552
|
+
"name": "param",
|
|
553
|
+
"text": "opts - Feed ad id and interval in ms, or `null` to disable"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"name": "since",
|
|
557
|
+
"text": "8.3.0"
|
|
558
|
+
}
|
|
559
|
+
],
|
|
560
|
+
"docs": "Enable or disable auto-refresh (minimum 30 seconds).",
|
|
561
|
+
"complexTypes": [],
|
|
562
|
+
"slug": "feedadsetautorefresh"
|
|
563
|
+
},
|
|
306
564
|
{
|
|
307
565
|
"name": "trackingAuthorizationStatus",
|
|
308
566
|
"signature": "() => Promise<{ status: TrackingAuthorizationStatus | false; }>",
|
|
@@ -363,17 +621,17 @@
|
|
|
363
621
|
},
|
|
364
622
|
{
|
|
365
623
|
"name": "addListener",
|
|
366
|
-
"signature": "(eventName:
|
|
624
|
+
"signature": "<E extends AdMobPlusEventName>(eventName: E, listenerFunc: (event: AdMobPlusEventPayloadMap[E]) => void) => Promise<PluginListenerHandle> & PluginListenerHandle",
|
|
367
625
|
"parameters": [
|
|
368
626
|
{
|
|
369
627
|
"name": "eventName",
|
|
370
628
|
"docs": "- The name of the event to listen for",
|
|
371
|
-
"type": "
|
|
629
|
+
"type": "E"
|
|
372
630
|
},
|
|
373
631
|
{
|
|
374
632
|
"name": "listenerFunc",
|
|
375
633
|
"docs": "- The function to call when the event occurs",
|
|
376
|
-
"type": "(event:
|
|
634
|
+
"type": "(event: AdMobPlusEventPayloadMap[E]) => void"
|
|
377
635
|
}
|
|
378
636
|
],
|
|
379
637
|
"returns": "Promise<PluginListenerHandle> & PluginListenerHandle",
|
|
@@ -401,9 +659,12 @@
|
|
|
401
659
|
],
|
|
402
660
|
"docs": "Add a listener for ad events.",
|
|
403
661
|
"complexTypes": [
|
|
404
|
-
"PluginListenerHandle"
|
|
662
|
+
"PluginListenerHandle",
|
|
663
|
+
"AdMobPlusEventName",
|
|
664
|
+
"E",
|
|
665
|
+
"AdMobPlusEventPayloadMap"
|
|
405
666
|
],
|
|
406
|
-
"slug": "
|
|
667
|
+
"slug": "addlistenere-"
|
|
407
668
|
},
|
|
408
669
|
{
|
|
409
670
|
"name": "getPluginVersion",
|
|
@@ -490,6 +751,101 @@
|
|
|
490
751
|
}
|
|
491
752
|
]
|
|
492
753
|
},
|
|
754
|
+
{
|
|
755
|
+
"name": "AdmobConsentStatus",
|
|
756
|
+
"slug": "admobconsentstatus",
|
|
757
|
+
"members": [
|
|
758
|
+
{
|
|
759
|
+
"name": "NOT_REQUIRED",
|
|
760
|
+
"value": "'NOT_REQUIRED'",
|
|
761
|
+
"tags": [],
|
|
762
|
+
"docs": "User consent not required."
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"name": "OBTAINED",
|
|
766
|
+
"value": "'OBTAINED'",
|
|
767
|
+
"tags": [],
|
|
768
|
+
"docs": "User consent already obtained."
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"name": "REQUIRED",
|
|
772
|
+
"value": "'REQUIRED'",
|
|
773
|
+
"tags": [],
|
|
774
|
+
"docs": "User consent required but not yet obtained."
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
"name": "UNKNOWN",
|
|
778
|
+
"value": "'UNKNOWN'",
|
|
779
|
+
"tags": [],
|
|
780
|
+
"docs": "Unknown consent status. Call requestConsentInfo() to update it."
|
|
781
|
+
}
|
|
782
|
+
]
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
"name": "PrivacyOptionsRequirementStatus",
|
|
786
|
+
"slug": "privacyoptionsrequirementstatus",
|
|
787
|
+
"members": [
|
|
788
|
+
{
|
|
789
|
+
"name": "NOT_REQUIRED",
|
|
790
|
+
"value": "'NOT_REQUIRED'",
|
|
791
|
+
"tags": [],
|
|
792
|
+
"docs": "Privacy options entry point is not required."
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"name": "REQUIRED",
|
|
796
|
+
"value": "'REQUIRED'",
|
|
797
|
+
"tags": [],
|
|
798
|
+
"docs": "Privacy options entry point is required."
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"name": "UNKNOWN",
|
|
802
|
+
"value": "'UNKNOWN'",
|
|
803
|
+
"tags": [],
|
|
804
|
+
"docs": "Privacy options requirement status is unknown."
|
|
805
|
+
}
|
|
806
|
+
]
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"name": "AdmobConsentDebugGeography",
|
|
810
|
+
"slug": "admobconsentdebuggeography",
|
|
811
|
+
"members": [
|
|
812
|
+
{
|
|
813
|
+
"name": "DISABLED",
|
|
814
|
+
"value": "0",
|
|
815
|
+
"tags": [],
|
|
816
|
+
"docs": "Debug geography disabled."
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"name": "EEA",
|
|
820
|
+
"value": "1",
|
|
821
|
+
"tags": [],
|
|
822
|
+
"docs": "Geography appears as in EEA for debug devices."
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
"name": "NOT_EEA",
|
|
826
|
+
"value": "2",
|
|
827
|
+
"tags": [
|
|
828
|
+
{
|
|
829
|
+
"text": "Use OTHER instead.",
|
|
830
|
+
"name": "deprecated"
|
|
831
|
+
}
|
|
832
|
+
],
|
|
833
|
+
"docs": "Geography appears as not in EEA for debug devices."
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"name": "US",
|
|
837
|
+
"value": "3",
|
|
838
|
+
"tags": [],
|
|
839
|
+
"docs": "Geography appears as in a regulated US state for debug devices."
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"name": "OTHER",
|
|
843
|
+
"value": "4",
|
|
844
|
+
"tags": [],
|
|
845
|
+
"docs": "Geography appears as OTHER for debug devices."
|
|
846
|
+
}
|
|
847
|
+
]
|
|
848
|
+
},
|
|
493
849
|
{
|
|
494
850
|
"name": "TrackingAuthorizationStatus",
|
|
495
851
|
"slug": "trackingauthorizationstatus",
|
|
@@ -546,6 +902,33 @@
|
|
|
546
902
|
}
|
|
547
903
|
]
|
|
548
904
|
},
|
|
905
|
+
{
|
|
906
|
+
"name": "AdmobConsentInfo",
|
|
907
|
+
"slug": "admobconsentinfo",
|
|
908
|
+
"docs": "Consent information returned by UMP.",
|
|
909
|
+
"types": [
|
|
910
|
+
{
|
|
911
|
+
"text": "{\n /** The consent status of the user. */\n status: AdmobConsentStatus;\n /** If true, a consent form is available. */\n isConsentFormAvailable?: boolean;\n /** If true, an ad request can be made. */\n canRequestAds: boolean;\n /** Privacy options requirement status of the user. */\n privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus;\n}",
|
|
912
|
+
"complexTypes": [
|
|
913
|
+
"AdmobConsentStatus",
|
|
914
|
+
"PrivacyOptionsRequirementStatus"
|
|
915
|
+
]
|
|
916
|
+
}
|
|
917
|
+
]
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"name": "AdmobConsentRequestOptions",
|
|
921
|
+
"slug": "admobconsentrequestoptions",
|
|
922
|
+
"docs": "Options for requesting UMP consent information.",
|
|
923
|
+
"types": [
|
|
924
|
+
{
|
|
925
|
+
"text": "{\n /** Sets the debug geography to test consent locally. */\n debugGeography?: AdmobConsentDebugGeography;\n /**\n * Test device IDs to allow for consent debugging.\n * On iOS, the ID may change if you uninstall and reinstall the app.\n */\n testDeviceIdentifiers?: string[];\n /**\n * When true, tags the user as under the age of consent for UMP requests.\n *\n * @default false\n */\n tagForUnderAgeOfConsent?: boolean;\n}",
|
|
926
|
+
"complexTypes": [
|
|
927
|
+
"AdmobConsentDebugGeography"
|
|
928
|
+
]
|
|
929
|
+
}
|
|
930
|
+
]
|
|
931
|
+
},
|
|
549
932
|
{
|
|
550
933
|
"name": "MobileAdOptions",
|
|
551
934
|
"slug": "mobileadoptions",
|
|
@@ -556,6 +939,161 @@
|
|
|
556
939
|
"complexTypes": []
|
|
557
940
|
}
|
|
558
941
|
]
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"name": "FeedAdCreateOptions",
|
|
945
|
+
"slug": "feedadcreateoptions",
|
|
946
|
+
"docs": "Options for creating an in-feed ad instance.\n\nPolicy: AdMob counts native impressions and clicks only when assets render inside\n{@link https://developers.google.com/admob/android/native/advanced | NativeAdView} /\nGADNativeAdView with the AdChoices icon and an ad attribution badge. This plugin\noverlays a compliant native view on your placeholder. Optional {@link FeedNativeAdAssets}\nare returned on `feed.load` for layout sizing only, not for manual click forwarding.",
|
|
947
|
+
"types": [
|
|
948
|
+
{
|
|
949
|
+
"text": "{\n /** Native advanced or inline banner. */\n format: FeedAdFormat;\n /** AdMob ad unit ID. */\n adUnitId: string;\n /** Optional key echoed on feed events for your feed slot. */\n positionKey?: string;\n /**\n * Auto-refresh interval in milliseconds. AdMob requires at least 30 seconds.\n * Omit or pass `null` to disable auto-refresh.\n */\n autoRefreshMs?: number | null;\n /** Template colors when `format` is `native`. */\n nativeStyle?: FeedNativeAdStyle;\n}",
|
|
950
|
+
"complexTypes": [
|
|
951
|
+
"FeedAdFormat",
|
|
952
|
+
"FeedNativeAdStyle"
|
|
953
|
+
]
|
|
954
|
+
}
|
|
955
|
+
]
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"name": "FeedAdFormat",
|
|
959
|
+
"slug": "feedadformat",
|
|
960
|
+
"docs": "In-feed ad format. Both use a native overlay aligned to an HTML placeholder.",
|
|
961
|
+
"types": [
|
|
962
|
+
{
|
|
963
|
+
"text": "'native'",
|
|
964
|
+
"complexTypes": []
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
"text": "'banner'",
|
|
968
|
+
"complexTypes": []
|
|
969
|
+
}
|
|
970
|
+
]
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"name": "FeedNativeAdStyle",
|
|
974
|
+
"slug": "feednativeadstyle",
|
|
975
|
+
"docs": "Optional colors for the built-in native ad template (hex strings, e.g. `#ffffff`).",
|
|
976
|
+
"types": [
|
|
977
|
+
{
|
|
978
|
+
"text": "{\n backgroundColor?: string;\n headlineTextColor?: string;\n bodyTextColor?: string;\n ctaBackgroundColor?: string;\n ctaTextColor?: string;\n}",
|
|
979
|
+
"complexTypes": []
|
|
980
|
+
}
|
|
981
|
+
]
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"name": "FeedAdBounds",
|
|
985
|
+
"slug": "feedadbounds",
|
|
986
|
+
"docs": "Bounds of the HTML placeholder, in CSS pixels relative to the WebView viewport.",
|
|
987
|
+
"types": [
|
|
988
|
+
{
|
|
989
|
+
"text": "{\n x: number;\n y: number;\n width: number;\n height: number;\n /** When false, the native overlay is hidden (e.g. off-screen while scrolling). */\n visible: boolean;\n /** `window.devicePixelRatio` from the WebView. Defaults to 1 on web. */\n density?: number;\n}",
|
|
990
|
+
"complexTypes": []
|
|
991
|
+
}
|
|
992
|
+
]
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"name": "AdMobPlusEventName",
|
|
996
|
+
"slug": "admobpluseventname",
|
|
997
|
+
"docs": "",
|
|
998
|
+
"types": [
|
|
999
|
+
{
|
|
1000
|
+
"text": "(typeof AdMobPlusEvents)[keyof typeof AdMobPlusEvents]",
|
|
1001
|
+
"complexTypes": []
|
|
1002
|
+
}
|
|
1003
|
+
]
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"name": "AdMobPlusEventPayloadMap",
|
|
1007
|
+
"slug": "admobpluseventpayloadmap",
|
|
1008
|
+
"docs": "Maps each {@link AdMobPlusEventName} to the payload shape emitted from native code.",
|
|
1009
|
+
"types": [
|
|
1010
|
+
{
|
|
1011
|
+
"text": "{\n [AdMobPlusEvents.AdClick]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.AdDismiss]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.AdImpression]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.AdLoad]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.AdLoadFail]: AdMobPlusAdFailurePayload;\n [AdMobPlusEvents.AdReward]: AdMobPlusAdRewardPayload;\n [AdMobPlusEvents.AdShow]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.AdShowFail]: AdMobPlusAdFailurePayload;\n [AdMobPlusEvents.BannerClick]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.BannerClose]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.BannerImpression]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.BannerLoad]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.BannerLoadFail]: AdMobPlusAdFailurePayload;\n [AdMobPlusEvents.BannerOpen]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.BannerSizeChange]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.InterstitialDismiss]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.InterstitialImpression]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.InterstitialLoad]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.InterstitialLoadFail]: AdMobPlusAdFailurePayload;\n [AdMobPlusEvents.InterstitialShow]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.InterstitialShowFail]: AdMobPlusAdFailurePayload;\n [AdMobPlusEvents.RewardedDismiss]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.RewardedImpression]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.RewardedInterstitialDismiss]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.RewardedInterstitialImpression]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.RewardedInterstitialLoad]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.RewardedInterstitialLoadFail]: AdMobPlusAdFailurePayload;\n [AdMobPlusEvents.RewardedInterstitialReward]: AdMobPlusAdRewardPayload;\n [AdMobPlusEvents.RewardedInterstitialShow]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.RewardedInterstitialShowFail]: AdMobPlusAdFailurePayload;\n [AdMobPlusEvents.RewardedLoad]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.RewardedLoadFail]: AdMobPlusAdFailurePayload;\n [AdMobPlusEvents.RewardedReward]: AdMobPlusAdRewardPayload;\n [AdMobPlusEvents.RewardedShow]: AdMobPlusAdIdPayload;\n [AdMobPlusEvents.RewardedShowFail]: AdMobPlusAdFailurePayload;\n [AdMobPlusEvents.FeedClick]: AdMobPlusFeedAdIdPayload;\n [AdMobPlusEvents.FeedClose]: AdMobPlusFeedAdIdPayload;\n [AdMobPlusEvents.FeedImpression]: AdMobPlusFeedAdIdPayload;\n [AdMobPlusEvents.FeedLoad]: AdMobPlusFeedLoadPayload;\n [AdMobPlusEvents.FeedLoadFail]: AdMobPlusAdFailurePayload & AdMobPlusFeedAdIdPayload;\n [AdMobPlusEvents.FeedOpen]: AdMobPlusFeedAdIdPayload;\n [AdMobPlusEvents.FeedRefresh]: AdMobPlusFeedAdIdPayload;\n}",
|
|
1012
|
+
"complexTypes": [
|
|
1013
|
+
"AdMobPlusAdIdPayload",
|
|
1014
|
+
"AdMobPlusAdFailurePayload",
|
|
1015
|
+
"AdMobPlusAdRewardPayload",
|
|
1016
|
+
"AdMobPlusFeedAdIdPayload",
|
|
1017
|
+
"AdMobPlusFeedLoadPayload"
|
|
1018
|
+
]
|
|
1019
|
+
}
|
|
1020
|
+
]
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"name": "AdMobPlusAdIdPayload",
|
|
1024
|
+
"slug": "admobplusadidpayload",
|
|
1025
|
+
"docs": "Event payload always includes the native ad instance id (`adId`). iOS also emits legacy `id`.",
|
|
1026
|
+
"types": [
|
|
1027
|
+
{
|
|
1028
|
+
"text": "{\n adId: number;\n id?: number;\n}",
|
|
1029
|
+
"complexTypes": []
|
|
1030
|
+
}
|
|
1031
|
+
]
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
"name": "AdMobPlusAdFailurePayload",
|
|
1035
|
+
"slug": "admobplusadfailurepayload",
|
|
1036
|
+
"docs": "Load and fullscreen show failure payloads from native `LoadAdError` / `FullScreenContentError`.",
|
|
1037
|
+
"types": [
|
|
1038
|
+
{
|
|
1039
|
+
"text": "AdMobPlusAdIdPayload & {\n code: number;\n message: string;\n /** Legacy iOS failure field; same string as `message` when present. */\n error?: string;\n}",
|
|
1040
|
+
"complexTypes": [
|
|
1041
|
+
"AdMobPlusAdIdPayload"
|
|
1042
|
+
]
|
|
1043
|
+
}
|
|
1044
|
+
]
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"name": "AdMobPlusAdRewardPayload",
|
|
1048
|
+
"slug": "admobplusadrewardpayload",
|
|
1049
|
+
"docs": "Reward callbacks include the earned reward plus `adId`.",
|
|
1050
|
+
"types": [
|
|
1051
|
+
{
|
|
1052
|
+
"text": "AdMobPlusAdIdPayload & {\n reward: {\n amount: number;\n type: string;\n };\n}",
|
|
1053
|
+
"complexTypes": [
|
|
1054
|
+
"AdMobPlusAdIdPayload"
|
|
1055
|
+
]
|
|
1056
|
+
}
|
|
1057
|
+
]
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
"name": "AdMobPlusFeedAdIdPayload",
|
|
1061
|
+
"slug": "admobplusfeedadidpayload",
|
|
1062
|
+
"docs": "In-feed ad events use `feedAdId` (same numeric id as `feedAdCreate`).",
|
|
1063
|
+
"types": [
|
|
1064
|
+
{
|
|
1065
|
+
"text": "{\n feedAdId: number;\n positionKey?: string;\n format?: 'native' | 'banner';\n}",
|
|
1066
|
+
"complexTypes": []
|
|
1067
|
+
}
|
|
1068
|
+
]
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"name": "AdMobPlusFeedLoadPayload",
|
|
1072
|
+
"slug": "admobplusfeedloadpayload",
|
|
1073
|
+
"docs": "",
|
|
1074
|
+
"types": [
|
|
1075
|
+
{
|
|
1076
|
+
"text": "AdMobPlusFeedAdIdPayload & {\n assets?: Record<string, unknown>;\n}",
|
|
1077
|
+
"complexTypes": [
|
|
1078
|
+
"AdMobPlusFeedAdIdPayload",
|
|
1079
|
+
"Record"
|
|
1080
|
+
]
|
|
1081
|
+
}
|
|
1082
|
+
]
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
"name": "Record",
|
|
1086
|
+
"slug": "record",
|
|
1087
|
+
"docs": "Construct a type with a set of properties K of type T",
|
|
1088
|
+
"types": [
|
|
1089
|
+
{
|
|
1090
|
+
"text": "{\r\n [P in K]: T;\r\n}",
|
|
1091
|
+
"complexTypes": [
|
|
1092
|
+
"K",
|
|
1093
|
+
"T"
|
|
1094
|
+
]
|
|
1095
|
+
}
|
|
1096
|
+
]
|
|
559
1097
|
}
|
|
560
1098
|
],
|
|
561
1099
|
"pluginConfigs": []
|