@pikopika/admob-plus-capacitor
v2.0.0-alpha.5
Published
AdMob Plus Capacitor Plugin
Downloads
4
Maintainers
Readme
@admob-plus/capacitor
AdMob Plus Capacitor Plugin
Install
npm install @admob-plus/capacitor
npx cap sync
Documentation
You can find the documentation on the website.
API
start()
configure(...)
configRequest(...)
adCreate(...)
adIsLoaded(...)
adLoad(...)
adShow(...)
adHide(...)
trackingAuthorizationStatus()
requestTrackingAuthorization()
addListener(string, ...)
- Interfaces
- Type Aliases
- Enums
start()
start() => Promise<void>
configure(...)
configure(config: AdMobConfig) => Promise<void>
| Param | Type |
| ------------ | --------------------------------------------------- |
| config
| AdMobConfig |
configRequest(...)
configRequest(requestConfig: RequestConfig) => Promise<void>
| Param | Type |
| ------------------- | ------------------------------------------------------- |
| requestConfig
| RequestConfig |
adCreate(...)
adCreate<O extends MobileAdOptions>(opts: O) => Promise<void>
| Param | Type |
| ---------- | -------------- |
| opts
| O |
adIsLoaded(...)
adIsLoaded(opts: { id: number; }) => Promise<boolean>
| Param | Type |
| ---------- | ---------------------------- |
| opts
| { id: number; } |
Returns: Promise<boolean>
adLoad(...)
adLoad(opts: { id: number; }) => Promise<void>
| Param | Type |
| ---------- | ---------------------------- |
| opts
| { id: number; } |
adShow(...)
adShow(opts: { id: number; }) => Promise<void>
| Param | Type |
| ---------- | ---------------------------- |
| opts
| { id: number; } |
adHide(...)
adHide(opts: { id: number; }) => Promise<void>
| Param | Type |
| ---------- | ---------------------------- |
| opts
| { id: number; } |
trackingAuthorizationStatus()
trackingAuthorizationStatus() => Promise<{ status: TrackingAuthorizationStatus | false; }>
Returns: Promise<{ status: false | TrackingAuthorizationStatus; }>
requestTrackingAuthorization()
requestTrackingAuthorization() => Promise<{ status: TrackingAuthorizationStatus | false; }>
Returns: Promise<{ status: false | TrackingAuthorizationStatus; }>
addListener(string, ...)
addListener(eventName: string, listenerFunc: (event: any) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | ------------------------------------ |
| eventName
| string |
| listenerFunc
| (event: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |
Type Aliases
AdMobConfig
{ appMuted?: boolean appVolume?: number }
RequestConfig
{ maxAdContentRating?: MaxAdContentRating sameAppKey?: boolean tagForChildDirectedTreatment?: boolean | null tagForUnderAgeOfConsent?: boolean | null testDeviceIds?: string[] }
MobileAdOptions
{ adUnitId: string }
Enums
MaxAdContentRating
| Members | Value |
| ----------------- | ----------------- |
| G
| 'G' |
| MA
| 'MA' |
| PG
| 'PG' |
| T
| 'T' |
| UNSPECIFIED
| '' |
TrackingAuthorizationStatus
| Members | Value |
| ------------------- | -------------- |
| notDetermined
| 0 |
| restricted
| 1 |
| denied
| 2 |
| authorized
| 3 |