Socket
Socket
Sign inDemoInstall

@capacitor-community/admob

Package Overview
Dependencies
Maintainers
31
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor-community/admob - npm Package Compare versions

Comparing version 3.0.0-3 to 3.0.0-4

android/src/main/java/com/getcapacitor/community/admob/executors/AdInterstitialExecutor.java

858

dist/docs.json

@@ -210,5 +210,5 @@ {

"name": "showRewardVideoAd",
"signature": "() => Promise<void>",
"signature": "() => Promise<AdMobRewardItem>",
"parameters": [],
"returns": "Promise<void>",
"returns": "Promise<AdMobRewardItem>",
"tags": [

@@ -225,70 +225,15 @@ {

"docs": "Show a reward video ad",
"complexTypes": [],
"complexTypes": [
"AdMobRewardItem"
],
"slug": "showrewardvideoad"
},
{
"name": "pauseRewardedVideo",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [
{
"name": "group",
"text": "RewardVideo"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Pause RewardedVideo",
"complexTypes": [],
"slug": "pauserewardedvideo"
},
{
"name": "resumeRewardedVideo",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [
{
"name": "group",
"text": "RewardVideo"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Resume RewardedVideo",
"complexTypes": [],
"slug": "resumerewardedvideo"
},
{
"name": "stopRewardedVideo",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [
{
"name": "group",
"text": "RewardVideo"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Close RewardedVideo",
"complexTypes": [],
"slug": "stoprewardedvideo"
},
{
"name": "addListener",
"signature": "(eventName: 'onAdLoaded', listenerFunc: (info: { size: { width: number; height: number; }; }) => void) => PluginListenerHandle",
"signature": "(eventName: 'bannerViewChangeSize', listenerFunc: (info: AdMobBannerSize) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onAdLoaded",
"type": "\"onAdLoaded\""
"docs": "bannerViewChangeSize",
"type": "\"bannerViewChangeSize\""
},

@@ -298,3 +243,3 @@ {

"docs": "",
"type": "(info: { size: { width: number; height: number; }; }) => void"
"type": "(info: AdMobBannerSize) => void"
}

@@ -310,3 +255,3 @@ ],

"name": "param",
"text": "eventName onAdLoaded"
"text": "eventName bannerViewChangeSize"
},

@@ -322,46 +267,6 @@ {

],
"docs": "Notice: banner ad is loaded(android)",
"docs": "",
"complexTypes": [
"PluginListenerHandle"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'onAdFailedToLoad', listenerFunc: (info: AdMobError) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onAdFailedToLoad",
"type": "\"onAdFailedToLoad\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(info: AdMobError) => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "group",
"text": "Banner"
},
{
"name": "param",
"text": "eventName onAdFailedToLoad"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Notice: failed to load Banner ad(android)",
"complexTypes": [
"PluginListenerHandle",
"AdMobError"
"AdMobBannerSize"
],

@@ -372,8 +277,8 @@ "slug": "addlistener"

"name": "addListener",
"signature": "(eventName: 'onAdOpened', listenerFunc: () => void) => PluginListenerHandle",
"signature": "(eventName: 'bannerViewDidReceiveAd', listenerFunc: () => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onAdOpened",
"type": "\"onAdOpened\""
"docs": "bannerViewDidReceiveAd",
"type": "\"bannerViewDidReceiveAd\""
},

@@ -394,3 +299,3 @@ {

"name": "param",
"text": "eventName onAdOpened"
"text": "eventName bannerViewDidReceiveAd"
},

@@ -403,6 +308,6 @@ {

"name": "since",
"text": "1.1.2"
"text": "3.0.0"
}
],
"docs": "Notice: banner ad is show(android)",
"docs": "Notice: request loaded Banner ad",
"complexTypes": [

@@ -415,8 +320,8 @@ "PluginListenerHandle"

"name": "addListener",
"signature": "(eventName: 'onAdClosed', listenerFunc: () => void) => PluginListenerHandle",
"signature": "(eventName: 'bannerView:didFailToReceiveAdWithError', listenerFunc: (info: AdMobError) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onAdClosed",
"type": "\"onAdClosed\""
"docs": "bannerView:didFailToReceiveAdWithError",
"type": "\"bannerView:didFailToReceiveAdWithError\""
},

@@ -426,86 +331,2 @@ {

"docs": "",
"type": "() => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "group",
"text": "Banner"
},
{
"name": "param",
"text": "eventName onAdClosed"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Notice: Banner ad is closed(android)",
"complexTypes": [
"PluginListenerHandle"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'adViewDidReceiveAd', listenerFunc: () => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "adViewDidReceiveAd",
"type": "\"adViewDidReceiveAd\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "() => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "deprecated",
"text": "iOS Only"
},
{
"name": "group",
"text": "Banner"
},
{
"name": "param",
"text": "eventName adViewDidReceiveAd"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Notice: request loaded Banner ad(iOS)",
"complexTypes": [
"PluginListenerHandle"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'adView:didFailToReceiveAdWithError', listenerFunc: (info: AdMobError) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "adView:didFailToReceiveAdWithError",
"type": "\"adView:didFailToReceiveAdWithError\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(info: AdMobError) => void"

@@ -517,6 +338,2 @@ }

{
"name": "deprecated",
"text": "iOS Only"
},
{
"name": "group",

@@ -527,3 +344,3 @@ "text": "Banner"

"name": "param",
"text": "eventName adView:didFailToReceiveAdWithError"
"text": "eventName bannerView:didFailToReceiveAdWithError"
},

@@ -536,6 +353,6 @@ {

"name": "since",
"text": "1.1.2"
"text": "3.0.0"
}
],
"docs": "Notice: request failed Banner ad(iOS)",
"docs": "Notice: request failed Banner ad",
"complexTypes": [

@@ -549,8 +366,8 @@ "PluginListenerHandle",

"name": "addListener",
"signature": "(eventName: 'adViewWillPresentScreen', listenerFunc: (info: any) => void) => PluginListenerHandle",
"signature": "(eventName: 'bannerViewWillPresentScreen', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "adViewWillPresentScreen",
"type": "\"adViewWillPresentScreen\""
"docs": "bannerViewWillPresentScreen",
"type": "\"bannerViewWillPresentScreen\""
},

@@ -566,6 +383,2 @@ {

{
"name": "deprecated",
"text": "iOS Only"
},
{
"name": "group",

@@ -576,3 +389,3 @@ "text": "Banner"

"name": "param",
"text": "eventName adViewWillPresentScreen"
"text": "eventName bannerViewWillPresentScreen"
},

@@ -585,6 +398,6 @@ {

"name": "since",
"text": "1.1.2"
"text": "3.0.0"
}
],
"docs": "Notice: full-screen view will be presented in response to the user clicking on an ad.(iOS)",
"docs": "Notice: full-screen banner view will be presented in response to the user clicking on an ad.",
"complexTypes": [

@@ -597,8 +410,8 @@ "PluginListenerHandle"

"name": "addListener",
"signature": "(eventName: 'adViewWillDismissScreen', listenerFunc: (info: any) => void) => PluginListenerHandle",
"signature": "(eventName: 'bannerViewWillDismissScreen', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "adViewWillDismissScreen",
"type": "\"adViewWillDismissScreen\""
"docs": "bannerViewWillDismissScreen",
"type": "\"bannerViewWillDismissScreen\""
},

@@ -614,6 +427,2 @@ {

{
"name": "deprecated",
"text": "iOS Only"
},
{
"name": "group",

@@ -624,3 +433,3 @@ "text": "Banner"

"name": "param",
"text": "eventName adViewWillDismissScreen"
"text": "eventName bannerViewWillDismissScreen"
},

@@ -633,6 +442,6 @@ {

"name": "since",
"text": "1.1.2"
"text": "3.0.0"
}
],
"docs": "Notice: The full-screen view will be dismissed.(iOS)",
"docs": "Notice: The full-screen banner view will be dismissed.",
"complexTypes": [

@@ -645,8 +454,8 @@ "PluginListenerHandle"

"name": "addListener",
"signature": "(eventName: 'adViewDidDismissScreen', listenerFunc: (info: any) => void) => PluginListenerHandle",
"signature": "(eventName: 'bannerViewWillDismissScreen', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "adViewDidDismissScreen",
"type": "\"adViewDidDismissScreen\""
"docs": "bannerViewWillDismissScreen",
"type": "\"bannerViewWillDismissScreen\""
},

@@ -662,6 +471,2 @@ {

{
"name": "deprecated",
"text": "iOS Only"
},
{
"name": "group",

@@ -672,3 +477,3 @@ "text": "Banner"

"name": "param",
"text": "eventName adViewDidDismissScreen"
"text": "eventName bannerViewWillDismissScreen"
},

@@ -681,6 +486,6 @@ {

"name": "since",
"text": "1.1.2"
"text": "3.0.0"
}
],
"docs": "Notice: The full-screen view has been dismissed.(iOS)",
"docs": "Notice: The full-screen banner view will been dismissed.",
"complexTypes": [

@@ -693,8 +498,8 @@ "PluginListenerHandle"

"name": "addListener",
"signature": "(eventName: 'onRewarded', listenerFunc: (adMobRewardItem: AdMobRewardItem) => void) => PluginListenerHandle",
"signature": "(eventName: 'bannerViewDidDismissScreen', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "adViewWillLeaveApplication",
"type": "\"onRewarded\""
"docs": "bannerViewDidDismissScreen",
"type": "\"bannerViewDidDismissScreen\""
},

@@ -704,3 +509,3 @@ {

"docs": "",
"type": "(adMobRewardItem: AdMobRewardItem) => void"
"type": "(info: any) => void"
}

@@ -716,3 +521,3 @@ ],

"name": "param",
"text": "eventName adViewWillLeaveApplication"
"text": "eventName bannerViewDidDismissScreen"
},

@@ -725,48 +530,7 @@ {

"name": "since",
"text": "1.1.2"
"text": "3.0.0"
}
],
"docs": "Notice: User click will open another app.",
"docs": "Notice: The full-screen banner view has been dismissed.",
"complexTypes": [
"PluginListenerHandle",
"AdMobRewardItem"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'onInterstitialAdLoaded', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onInterstitialAdLoaded",
"type": "\"onInterstitialAdLoaded\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(info: any) => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "group",
"text": "Interstitial"
},
{
"name": "param",
"text": "eventName onInterstitialAdLoaded"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.2.0"
}
],
"docs": "Notice: Interstitial ad loaded",
"complexTypes": [
"PluginListenerHandle"

@@ -778,8 +542,8 @@ ],

"name": "addListener",
"signature": "(eventName: 'onInterstitialAdOpened', listenerFunc: (info: any) => void) => PluginListenerHandle",
"signature": "(eventName: 'adDidPresentFullScreenContent', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onInterstitialAdOpened",
"type": "\"onInterstitialAdOpened\""
"docs": "adDidPresentFullScreenContent",
"type": "\"adDidPresentFullScreenContent\""
},

@@ -796,7 +560,7 @@ {

"name": "group",
"text": "Interstitial"
"text": "fullscreen"
},
{
"name": "param",
"text": "eventName onInterstitialAdOpened"
"text": "eventName adDidPresentFullScreenContent"
},

@@ -809,3 +573,3 @@ {

"name": "since",
"text": "1.2.0"
"text": "3.0.0"
}

@@ -821,8 +585,8 @@ ],

"name": "addListener",
"signature": "(eventName: 'onInterstitialAdClosed', listenerFunc: (info: any) => void) => PluginListenerHandle",
"signature": "(eventName: 'adDidDismissFullScreenContent', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onInterstitialAdClosed",
"type": "\"onInterstitialAdClosed\""
"docs": "adDidDismissFullScreenContent",
"type": "\"adDidDismissFullScreenContent\""
},

@@ -839,7 +603,7 @@ {

"name": "group",
"text": "Interstitial"
"text": "fullscreen"
},
{
"name": "param",
"text": "eventName onInterstitialAdClosed"
"text": "eventName adDidDismissFullScreenContent"
},

@@ -852,6 +616,6 @@ {

"name": "since",
"text": "1.2.0"
"text": "3.0.0"
}
],
"docs": "Notice: Interstitial ad closed",
"docs": "Notice: Dismiss Content",
"complexTypes": [

@@ -864,8 +628,8 @@ "PluginListenerHandle"

"name": "addListener",
"signature": "(eventName: 'onInterstitialAdLeftApplication', listenerFunc: (info: any) => void) => PluginListenerHandle",
"signature": "(eventName: 'didFailToPresentFullScreenContentWithError', listenerFunc: (info: AdMobError) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onInterstitialAdLeftApplication",
"type": "\"onInterstitialAdLeftApplication\""
"docs": "didFailToPresentFullScreenContentWithError",
"type": "\"didFailToPresentFullScreenContentWithError\""
},

@@ -875,42 +639,2 @@ {

"docs": "",
"type": "(info: any) => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "group",
"text": "Interstitial"
},
{
"name": "param",
"text": "eventName onInterstitialAdLeftApplication"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.2.0"
}
],
"docs": "Notice: Click link of Interstitial ad",
"complexTypes": [
"PluginListenerHandle"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'onInterstitialAdFailedToLoad', listenerFunc: (info: AdMobError) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onInterstitialAdFailedToLoad",
"type": "\"onInterstitialAdFailedToLoad\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(info: AdMobError) => void"

@@ -923,7 +647,7 @@ }

"name": "group",
"text": "Interstitial"
"text": "fullscreen"
},
{
"name": "param",
"text": "eventName onInterstitialAdFailedToLoad"
"text": "eventName didFailToPresentFullScreenContentWithError"
},

@@ -936,6 +660,6 @@ {

"name": "since",
"text": "1.1.2"
"text": "3.0.0"
}
],
"docs": "Notice: Failed to load Interstitial ad",
"docs": "Notice: Interstitial ad is be failed to open",
"complexTypes": [

@@ -946,371 +670,2 @@ "PluginListenerHandle",

"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'onRewardedVideoAdLoaded', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onRewardedVideoAdLoaded",
"type": "\"onRewardedVideoAdLoaded\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(info: any) => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "group",
"text": "RewardedVideo"
},
{
"name": "param",
"text": "eventName onRewardedVideoAdLoaded"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Notice: Prepared RewardedVideo",
"complexTypes": [
"PluginListenerHandle"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'onRewardedVideoAdOpened', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onRewardedVideoAdOpened",
"type": "\"onRewardedVideoAdOpened\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(info: any) => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "group",
"text": "RewardedVideo"
},
{
"name": "param",
"text": "eventName onRewardedVideoAdOpened"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Notice: RewardedVideo is opened",
"complexTypes": [
"PluginListenerHandle"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'onAdLeftApplication', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onRewardedVideoAdOpened",
"type": "\"onAdLeftApplication\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(info: any) => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "deprecated",
"text": "Android Only"
},
{
"name": "group",
"text": "RewardedVideo"
},
{
"name": "param",
"text": "eventName onRewardedVideoAdOpened"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Notice: RewardedVideo go to background(Android)",
"complexTypes": [
"PluginListenerHandle"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'onRewardedVideoStarted', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onRewardedVideoStarted",
"type": "\"onRewardedVideoStarted\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(info: any) => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "group",
"text": "RewardedVideo"
},
{
"name": "param",
"text": "eventName onRewardedVideoStarted"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Notice: RewardedVideo is started",
"complexTypes": [
"PluginListenerHandle"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'onRewardedVideoAdClosed', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onRewardedVideoAdClosed",
"type": "\"onRewardedVideoAdClosed\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(info: any) => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "group",
"text": "RewardedVideo"
},
{
"name": "param",
"text": "eventName onRewardedVideoAdClosed"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Notice: RewardedVideo is closed",
"complexTypes": [
"PluginListenerHandle"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'onRewarded', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onRewarded",
"type": "\"onRewarded\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(info: any) => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "group",
"text": "RewardedVideo"
},
{
"name": "param",
"text": "eventName onRewarded"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Notice: User get reward by RewardedVideo",
"complexTypes": [
"PluginListenerHandle"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'onRewardedVideoAdLeftApplication', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onRewardedVideoAdLeftApplication",
"type": "\"onRewardedVideoAdLeftApplication\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(info: any) => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "group",
"text": "RewardedVideo"
},
{
"name": "param",
"text": "eventName onRewardedVideoAdLeftApplication"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Notice: click link of RewardedVideo ad",
"complexTypes": [
"PluginListenerHandle"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'onRewardedVideoAdFailedToLoad', listenerFunc: (error: AdMobError) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onRewardedVideoAdFailedToLoad",
"type": "\"onRewardedVideoAdFailedToLoad\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(error: AdMobError) => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "group",
"text": "RewardedVideo"
},
{
"name": "param",
"text": "eventName onRewardedVideoAdFailedToLoad"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Notice: Failed to load RewardVideo ad",
"complexTypes": [
"PluginListenerHandle",
"AdMobError"
],
"slug": "addlistener"
},
{
"name": "addListener",
"signature": "(eventName: 'onRewardedVideoCompleted', listenerFunc: (info: any) => void) => PluginListenerHandle",
"parameters": [
{
"name": "eventName",
"docs": "onRewardedVideoCompleted",
"type": "\"onRewardedVideoCompleted\""
},
{
"name": "listenerFunc",
"docs": "",
"type": "(info: any) => void"
}
],
"returns": "PluginListenerHandle",
"tags": [
{
"name": "deprecated",
"text": "Android Only"
},
{
"name": "group",
"text": "RewardedVideo"
},
{
"name": "param",
"text": "eventName onRewardedVideoCompleted"
},
{
"name": "param",
"text": "listenerFunc"
},
{
"name": "since",
"text": "1.1.2"
}
],
"docs": "Notice: Watch RewardVideo complete(Android)",
"complexTypes": [
"PluginListenerHandle"
],
"slug": "addlistener"
}

@@ -1500,2 +855,25 @@ ],

{
"name": "AdMobRewardItem",
"slug": "admobrewarditem",
"docs": "For more information\nhttps://developers.google.com/admob/android/rewarded-video-adapters?hl=en",
"tags": [],
"methods": [],
"properties": [
{
"name": "type",
"tags": [],
"docs": "Rewarded type user got",
"complexTypes": [],
"type": "string"
},
{
"name": "amount",
"tags": [],
"docs": "Rewarded amount user got",
"complexTypes": [],
"type": "number"
}
]
},
{
"name": "PluginListenerHandle",

@@ -1517,2 +895,25 @@ "slug": "pluginlistenerhandle",

{
"name": "AdMobBannerSize",
"slug": "admobbannersize",
"docs": "When notice listener of OnAdLoaded, you can get banner size.",
"tags": [],
"methods": [],
"properties": [
{
"name": "width",
"tags": [],
"docs": "",
"complexTypes": [],
"type": "number"
},
{
"name": "height",
"tags": [],
"docs": "",
"complexTypes": [],
"type": "number"
}
]
},
{
"name": "AdMobError",

@@ -1553,25 +954,2 @@ "slug": "admoberror",

]
},
{
"name": "AdMobRewardItem",
"slug": "admobrewarditem",
"docs": "For more information\nhttps://developers.google.com/admob/android/rewarded-video-adapters?hl=en",
"tags": [],
"methods": [],
"properties": [
{
"name": "type",
"tags": [],
"docs": "Rewarded type user got",
"complexTypes": [],
"type": "string"
},
{
"name": "amount",
"tags": [],
"docs": "Rewarded amount user got",
"complexTypes": [],
"type": "number"
}
]
}

@@ -1624,2 +1002,8 @@ ],

"tags": [],
"docs": "deprecated: A dynamically sized banner that is full-width and auto-height."
},
{
"name": "ADAPTIVE_BANNER",
"value": "'ADAPTIVE_BANNER'",
"tags": [],
"docs": "A dynamically sized banner that is full-width and auto-height."

@@ -1626,0 +1010,0 @@ },

@@ -1,2 +0,2 @@

import { PluginListenerHandle } from '@capacitor/core';
import type { PluginListenerHandle } from '@capacitor/core';
export interface AdMobPlugin {

@@ -69,252 +69,92 @@ /**

*/
showRewardVideoAd(): Promise<void>;
showRewardVideoAd(): Promise<AdMobRewardItem>;
/**
* Pause RewardedVideo
*
* @group RewardVideo
* @since 1.1.2
*/
pauseRewardedVideo(): Promise<void>;
/**
* Resume RewardedVideo
*
* @group RewardVideo
* @since 1.1.2
*/
resumeRewardedVideo(): Promise<void>;
/**
* Close RewardedVideo
*
* @group RewardVideo
* @since 1.1.2
*/
stopRewardedVideo(): Promise<void>;
/**
* Notice: banner ad is loaded(android)
*
* @group Banner
* @param eventName onAdLoaded
* @param eventName bannerViewChangeSize
* @param listenerFunc
* @since 3.0.0
*/
addListener(eventName: 'onAdLoaded', listenerFunc: (info: {
size: {
width: number;
height: number;
};
}) => void): PluginListenerHandle;
addListener(eventName: 'bannerViewChangeSize', listenerFunc: (info: AdMobBannerSize) => void): PluginListenerHandle;
/**
* Notice: failed to load Banner ad(android)
* Notice: request loaded Banner ad
*
* @group Banner
* @param eventName onAdFailedToLoad
* @param eventName bannerViewDidReceiveAd
* @param listenerFunc
* @since 1.1.2
* @since 3.0.0
*/
addListener(eventName: 'onAdFailedToLoad', listenerFunc: (info: AdMobError) => void): PluginListenerHandle;
addListener(eventName: 'bannerViewDidReceiveAd', listenerFunc: () => void): PluginListenerHandle;
/**
* Notice: banner ad is show(android)
* Notice: request failed Banner ad
*
* @group Banner
* @param eventName onAdOpened
* @param eventName bannerView:didFailToReceiveAdWithError
* @param listenerFunc
* @since 1.1.2
* @since 3.0.0
*/
addListener(eventName: 'onAdOpened', listenerFunc: () => void): PluginListenerHandle;
addListener(eventName: 'bannerView:didFailToReceiveAdWithError', listenerFunc: (info: AdMobError) => void): PluginListenerHandle;
/**
* Notice: Banner ad is closed(android)
* Notice: full-screen banner view will be presented in response to the user clicking on an ad.
*
* @group Banner
* @param eventName onAdClosed
* @param eventName bannerViewWillPresentScreen
* @param listenerFunc
* @since 1.1.2
* @since 3.0.0
*/
addListener(eventName: 'onAdClosed', listenerFunc: () => void): PluginListenerHandle;
addListener(eventName: 'bannerViewWillPresentScreen', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: request loaded Banner ad(iOS)
* Notice: The full-screen banner view will be dismissed.
*
* @deprecated iOS Only
* @group Banner
* @param eventName adViewDidReceiveAd
* @param eventName bannerViewWillDismissScreen
* @param listenerFunc
* @since 1.1.2
* @since 3.0.0
*/
addListener(eventName: 'adViewDidReceiveAd', listenerFunc: () => void): PluginListenerHandle;
addListener(eventName: 'bannerViewWillDismissScreen', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: request failed Banner ad(iOS)
* Notice: The full-screen banner view will been dismissed.
*
* @deprecated iOS Only
* @group Banner
* @param eventName adView:didFailToReceiveAdWithError
* @param eventName bannerViewWillDismissScreen
* @param listenerFunc
* @since 1.1.2
* @since 3.0.0
*/
addListener(eventName: 'adView:didFailToReceiveAdWithError', listenerFunc: (info: AdMobError) => void): PluginListenerHandle;
addListener(eventName: 'bannerViewWillDismissScreen', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: full-screen view will be presented in response to the user clicking on an ad.(iOS)
* Notice: The full-screen banner view has been dismissed.
*
* @deprecated iOS Only
* @group Banner
* @param eventName adViewWillPresentScreen
* @param eventName bannerViewDidDismissScreen
* @param listenerFunc
* @since 1.1.2
* @since 3.0.0
*/
addListener(eventName: 'adViewWillPresentScreen', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'bannerViewDidDismissScreen', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: The full-screen view will be dismissed.(iOS)
*
* @deprecated iOS Only
* @group Banner
* @param eventName adViewWillDismissScreen
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'adViewWillDismissScreen', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: The full-screen view has been dismissed.(iOS)
*
* @deprecated iOS Only
* @group Banner
* @param eventName adViewDidDismissScreen
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'adViewDidDismissScreen', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: User click will open another app.
*
* @group Banner
* @param eventName adViewWillLeaveApplication
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'onRewarded', listenerFunc: (adMobRewardItem: AdMobRewardItem) => void): PluginListenerHandle;
/**
* Notice: Interstitial ad loaded
*
* @group Interstitial
* @param eventName onInterstitialAdLoaded
* @param listenerFunc
* @since 1.2.0
*/
addListener(eventName: 'onInterstitialAdLoaded', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: Interstitial ad opened
*
* @group Interstitial
* @param eventName onInterstitialAdOpened
* @group fullscreen
* @param eventName adDidPresentFullScreenContent
* @param listenerFunc
* @since 1.2.0
* @since 3.0.0
*/
addListener(eventName: 'onInterstitialAdOpened', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'adDidPresentFullScreenContent', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: Interstitial ad closed
* Notice: Dismiss Content
*
* @group Interstitial
* @param eventName onInterstitialAdClosed
* @group fullscreen
* @param eventName adDidDismissFullScreenContent
* @param listenerFunc
* @since 1.2.0
* @since 3.0.0
*/
addListener(eventName: 'onInterstitialAdClosed', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'adDidDismissFullScreenContent', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: Click link of Interstitial ad
* Notice: Interstitial ad is be failed to open
*
* @group Interstitial
* @param eventName onInterstitialAdLeftApplication
* @group fullscreen
* @param eventName didFailToPresentFullScreenContentWithError
* @param listenerFunc
* @since 1.2.0
* @since 3.0.0
*/
addListener(eventName: 'onInterstitialAdLeftApplication', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: Failed to load Interstitial ad
*
* @group Interstitial
* @param eventName onInterstitialAdFailedToLoad
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'onInterstitialAdFailedToLoad', listenerFunc: (info: AdMobError) => void): PluginListenerHandle;
/**
* Notice: Prepared RewardedVideo
*
* @group RewardedVideo
* @param eventName onRewardedVideoAdLoaded
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'onRewardedVideoAdLoaded', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: RewardedVideo is opened
*
* @group RewardedVideo
* @param eventName onRewardedVideoAdOpened
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'onRewardedVideoAdOpened', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: RewardedVideo go to background(Android)
*
* @deprecated Android Only
* @group RewardedVideo
* @param eventName onRewardedVideoAdOpened
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'onAdLeftApplication', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: RewardedVideo is started
*
* @group RewardedVideo
* @param eventName onRewardedVideoStarted
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'onRewardedVideoStarted', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: RewardedVideo is closed
*
* @group RewardedVideo
* @param eventName onRewardedVideoAdClosed
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'onRewardedVideoAdClosed', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: User get reward by RewardedVideo
*
* @group RewardedVideo
* @param eventName onRewarded
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'onRewarded', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: click link of RewardedVideo ad
*
* @group RewardedVideo
* @param eventName onRewardedVideoAdLeftApplication
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'onRewardedVideoAdLeftApplication', listenerFunc: (info: any) => void): PluginListenerHandle;
/**
* Notice: Failed to load RewardVideo ad
*
* @group RewardedVideo
* @param eventName onRewardedVideoAdFailedToLoad
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'onRewardedVideoAdFailedToLoad', listenerFunc: (error: AdMobError) => void): PluginListenerHandle;
/**
* Notice: Watch RewardVideo complete(Android)
*
* @deprecated Android Only
* @group RewardedVideo
* @param eventName onRewardedVideoCompleted
* @param listenerFunc
* @since 1.1.2
*/
addListener(eventName: 'onRewardedVideoCompleted', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'didFailToPresentFullScreenContentWithError', listenerFunc: (info: AdMobError) => void): PluginListenerHandle;
}

@@ -414,2 +254,9 @@ export interface AdMobInitializationOptions {

/**
* When notice listener of OnAdLoaded, you can get banner size.
*/
export interface AdMobBannerSize {
width: number;
height: number;
}
/**
* For more information

@@ -474,6 +321,10 @@ * https://developers.google.com/android/reference/com/google/android/gms/ads/AdError

/**
* A dynamically sized banner that is full-width and auto-height.
* deprecated: A dynamically sized banner that is full-width and auto-height.
*/
SMART_BANNER = "SMART_BANNER",
/**
* A dynamically sized banner that is full-width and auto-height.
*/
ADAPTIVE_BANNER = "ADAPTIVE_BANNER",
/**
* To define a custom banner size, set your desired AdSize

@@ -480,0 +331,0 @@ */

@@ -39,6 +39,10 @@ /**

/**
* A dynamically sized banner that is full-width and auto-height.
* deprecated: A dynamically sized banner that is full-width and auto-height.
*/
AdSize["SMART_BANNER"] = "SMART_BANNER";
/**
* A dynamically sized banner that is full-width and auto-height.
*/
AdSize["ADAPTIVE_BANNER"] = "ADAPTIVE_BANNER";
/**
* To define a custom banner size, set your desired AdSize

@@ -45,0 +49,0 @@ */

import { WebPlugin } from '@capacitor/core';
import { AdOptions } from './definitions';
import type { AdMobPlugin } from './definitions';
import type { AdMobRewardItem, AdOptions, AdMobPlugin } from './definitions';
export declare class AdMobWeb extends WebPlugin implements AdMobPlugin {

@@ -14,6 +13,3 @@ constructor();

prepareRewardVideoAd(options: AdOptions): Promise<void>;
showRewardVideoAd(): Promise<void>;
pauseRewardedVideo(): Promise<void>;
resumeRewardedVideo(): Promise<void>;
stopRewardedVideo(): Promise<void>;
showRewardVideoAd(): Promise<AdMobRewardItem>;
}

@@ -9,4 +9,5 @@ import { WebPlugin } from '@capacitor/core';

}
async initialize() { }
// @ts-ignore
async initialize() {
console.log();
}
async showBanner(options) {

@@ -16,19 +17,29 @@ console.log(options);

// Hide the banner, remove it from screen, but can show it later
async hideBanner() { }
async hideBanner() {
console.log();
}
// Resume the banner, show it after hide
async resumeBanner() { }
async resumeBanner() {
console.log();
}
// Destroy the banner, remove it from screen.
async removeBanner() { }
async removeBanner() {
console.log();
}
async prepareInterstitial(options) {
console.log(options);
}
async showInterstitial() { }
async showInterstitial() {
console.log();
}
async prepareRewardVideoAd(options) {
console.log(options);
}
async showRewardVideoAd() { }
async pauseRewardedVideo() { }
async resumeRewardedVideo() { }
async stopRewardedVideo() { }
async showRewardVideoAd() {
return {
type: '',
amount: 0,
};
}
}
//# sourceMappingURL=web.js.map

@@ -45,6 +45,10 @@ 'use strict';

/**
* A dynamically sized banner that is full-width and auto-height.
* deprecated: A dynamically sized banner that is full-width and auto-height.
*/
AdSize["SMART_BANNER"] = "SMART_BANNER";
/**
* A dynamically sized banner that is full-width and auto-height.
*/
AdSize["ADAPTIVE_BANNER"] = "ADAPTIVE_BANNER";
/**
* To define a custom banner size, set your desired AdSize

@@ -84,4 +88,5 @@ */

}
async initialize() { }
// @ts-ignore
async initialize() {
console.log();
}
async showBanner(options) {

@@ -91,18 +96,28 @@ console.log(options);

// Hide the banner, remove it from screen, but can show it later
async hideBanner() { }
async hideBanner() {
console.log();
}
// Resume the banner, show it after hide
async resumeBanner() { }
async resumeBanner() {
console.log();
}
// Destroy the banner, remove it from screen.
async removeBanner() { }
async removeBanner() {
console.log();
}
async prepareInterstitial(options) {
console.log(options);
}
async showInterstitial() { }
async showInterstitial() {
console.log();
}
async prepareRewardVideoAd(options) {
console.log(options);
}
async showRewardVideoAd() { }
async pauseRewardedVideo() { }
async resumeRewardedVideo() { }
async stopRewardedVideo() { }
async showRewardVideoAd() {
return {
type: '',
amount: 0,
};
}
}

@@ -109,0 +124,0 @@

@@ -42,6 +42,10 @@ var AdMobPlugin = (function (exports, core) {

/**
* A dynamically sized banner that is full-width and auto-height.
* deprecated: A dynamically sized banner that is full-width and auto-height.
*/
AdSize["SMART_BANNER"] = "SMART_BANNER";
/**
* A dynamically sized banner that is full-width and auto-height.
*/
AdSize["ADAPTIVE_BANNER"] = "ADAPTIVE_BANNER";
/**
* To define a custom banner size, set your desired AdSize

@@ -81,4 +85,5 @@ */

}
async initialize() { }
// @ts-ignore
async initialize() {
console.log();
}
async showBanner(options) {

@@ -88,18 +93,28 @@ console.log(options);

// Hide the banner, remove it from screen, but can show it later
async hideBanner() { }
async hideBanner() {
console.log();
}
// Resume the banner, show it after hide
async resumeBanner() { }
async resumeBanner() {
console.log();
}
// Destroy the banner, remove it from screen.
async removeBanner() { }
async removeBanner() {
console.log();
}
async prepareInterstitial(options) {
console.log(options);
}
async showInterstitial() { }
async showInterstitial() {
console.log();
}
async prepareRewardVideoAd(options) {
console.log(options);
}
async showRewardVideoAd() { }
async pauseRewardedVideo() { }
async resumeRewardedVideo() { }
async stopRewardedVideo() { }
async showRewardVideoAd() {
return {
type: '',
amount: 0,
};
}
}

@@ -106,0 +121,0 @@

{
"name": "@capacitor-community/admob",
"version": "3.0.0-3",
"version": "3.0.0-4",
"description": "A native plugin for AdMob",

@@ -32,6 +32,6 @@ "main": "dist/plugin.cjs.js",

"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- autocorrect --format",
"eslint": "eslint . --ext ts",
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"eslint": "eslint src/. --ext ts",
"prettier": "prettier --write \"{src/*.ts,**/*.java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api AdMobPlugin --output-readme README_AUTO.md --output-json dist/docs.json",
"docgen": "docgen --api AdMobPlugin --output-readme README.md --output-json dist/docs.json",
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",

@@ -44,6 +44,6 @@ "clean": "rimraf ./dist",

"devDependencies": {
"@capacitor/android": "3.0.0-beta.3",
"@capacitor/cli": "3.0.0-beta.3",
"@capacitor/android": "^3.0.0-rc.0",
"@capacitor/cli": "^3.0.0-rc.0",
"@capacitor/docgen": "^0.0.10",
"@capacitor/ios": "3.0.0-beta.3",
"@capacitor/ios": "^3.0.0-rc.0",
"@ionic/eslint-config": "^0.3.0",

@@ -62,3 +62,3 @@ "@ionic/prettier-config": "^1.0.1",

"dependencies": {
"@capacitor/core": "3.0.0-beta.3"
"@capacitor/core": "3.0.0-rc.0"
},

@@ -65,0 +65,0 @@ "prettier": "@ionic/prettier-config",

@@ -35,3 +35,3 @@ [![npm version](https://badge.fury.io/js/%40capacitor-community%2Fadmob.svg)](https://badge.fury.io/js/%40capacitor-community%2Fadmob)

```
% npm install --save @capacitor-community/admob@next
% npm install --save @capacitor-community/admob@3.0.0-2
% npx cap update

@@ -208,3 +208,3 @@ ```

// Subscribe Banner Event Listener
AdMob.addListener('onAdLoaded', (info: boolean) => {
AdMob.addListener('bannerViewDidReceiveAd', (info: boolean) => {
console.log('Banner Ad Loaded');

@@ -214,3 +214,3 @@ });

// Get Banner Size
AdMob.addListener('onAdSize', (info: boolean) => {
AdMob.addListener('bannerViewChangeSize', (info: boolean) => {
console.log(info);

@@ -243,18 +243,4 @@ });

#### Event Listener
This following Event Listener can be called in **Banner AD**.
```ts
addListener(eventName: 'onAdLoaded', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onAdFailedToLoad', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onAdOpened', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onAdClosed', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onAdSize', listenerFunc: (info: any) => void): PluginListenerHandle;
```
### INTERSTITIAL
#### prepareInterstitial(options: AdOptions): Promise<{ value: boolean }>
```ts

@@ -274,10 +260,9 @@ import { AdMob, AdOptions } from '@capacitor-community/admob';

constructor() {
// Subscribe interstitial Event Listener
AdMob.addListener('onInterstitialAdLoaded', (info: boolean) => {
AdMob.showInterstitial();
});
// Prepare interstitial banner
AdMob.prepareInterstitial(this.options);
// Subscribe Banner Event Listener
AdMob.addListener('onInterstitialAdLoaded', (info: boolean) => {
// You can call showInterstitial() here or anytime you want.
console.log('Interstitial Ad Loaded');
});
}

@@ -287,25 +272,4 @@ }

#### showInterstitial(): Promise<{ value: boolean }>
```ts
// Show interstitial ad when it’s ready
AdMob.showInterstitial();
```
#### Event Listener
This following Event Listener can be called in **Interstitial AD**
```ts
addListener(eventName: 'onInterstitialAdLoaded', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onInterstitialAdFailedToLoad', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onInterstitialAdOpened', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onInterstitialAdClosed', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onInterstitialAdLeftApplication', listenerFunc: (info: any) => void): PluginListenerHandle;
```
### RewardVideo
#### prepareRewardVideoAd(options: AdOptions): Promise<{ value: boolean }>
```ts

@@ -325,10 +289,6 @@ import { AdMob, AdOptions } from '@capacitor-community/admob';

constructor() {
// Prepare ReWardVideo
AdMob.addListener('onRewardedVideoAdLoaded', () => {
AdMob.showRewardVideoAd();
});
AdMob.prepareRewardVideoAd(this.options);
// Subscribe ReWardVideo Event Listener
AdMob.addListener('onRewardedVideoAdLoaded', (info: boolean) => {
// You can call showRewardVideoAd() here or anytime you want.
console.log('RewardedVideoAd Loaded');
});
}

@@ -338,82 +298,459 @@ }

#### showRewardVideoAd(): Promise<{ value: boolean }>
## Index
<docgen-index>
```ts
// Show a RewardVideo AD
AdMob.showRewardVideoAd();
* [`initialize(...)`](#initialize)
* [`showBanner(...)`](#showbanner)
* [`hideBanner()`](#hidebanner)
* [`resumeBanner()`](#resumebanner)
* [`removeBanner()`](#removebanner)
* [`prepareInterstitial(...)`](#prepareinterstitial)
* [`showInterstitial()`](#showinterstitial)
* [`prepareRewardVideoAd(...)`](#preparerewardvideoad)
* [`showRewardVideoAd()`](#showrewardvideoad)
* [`addListener(...)`](#addlistener)
* [`addListener(...)`](#addlistener)
* [`addListener(...)`](#addlistener)
* [`addListener(...)`](#addlistener)
* [`addListener(...)`](#addlistener)
* [`addListener(...)`](#addlistener)
* [`addListener(...)`](#addlistener)
* [`addListener(...)`](#addlistener)
* [`addListener(...)`](#addlistener)
* [`addListener(...)`](#addlistener)
* [Interfaces](#interfaces)
* [Enums](#enums)
</docgen-index>
## API
<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
### initialize(...)
```typescript
initialize(options: AdMobInitializationOptions) => Promise<void>
```
#### pauseRewardedVideo(): Promise<{ value: boolean }>
Initialize AdMob with <a href="#admobinitializationoptions">AdMobInitializationOptions</a>
```ts
// Pause a RewardVideo AD
AdMob.pauseRewardedVideo();
| Param | Type | Description |
| ------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| **`options`** | <code><a href="#admobinitializationoptions">AdMobInitializationOptions</a></code> | <a href="#admobinitializationoptions">AdMobInitializationOptions</a> |
**Since:** 1.1.2
--------------------
### showBanner(...)
```typescript
showBanner(options: AdOptions) => Promise<void>
```
#### resumeRewardedVideo(): Promise<{ value: boolean }>
Show a banner Ad
```ts
// Resume a RewardVideo AD
AdMob.resumeRewardedVideo();
| Param | Type | Description |
| ------------- | ----------------------------------------------- | ---------------------------------- |
| **`options`** | <code><a href="#adoptions">AdOptions</a></code> | <a href="#adoptions">AdOptions</a> |
**Since:** 1.1.2
--------------------
### hideBanner()
```typescript
hideBanner() => Promise<void>
```
#### stopRewardedVideo(): Promise<{ value: boolean }>
Hide the banner, remove it from screen, but can show it later
```ts
// Stop a RewardVideo AD
AdMob.stopRewardedVideo();
**Since:** 1.1.2
--------------------
### resumeBanner()
```typescript
resumeBanner() => Promise<void>
```
#### Event Listener
Resume the banner, show it after hide
This following Event Listener can be called in **RewardedVideo**
**Since:** 1.1.2
```ts
addListener(eventName: 'onRewardedVideoAdLoaded', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onRewardedVideoAdOpened', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onRewardedVideoStarted', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onRewardedVideoAdClosed', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onRewarded', listenerFunc: (info: { type: string, coin: number }) => void): PluginListenerHandle;
addListener(eventName: 'onRewardedVideoAdLeftApplication', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onRewardedVideoAdFailedToLoad', listenerFunc: (info: any) => void): PluginListenerHandle;
addListener(eventName: 'onRewardedVideoCompleted', listenerFunc: (info: any) => void): PluginListenerHandle;
--------------------
### removeBanner()
```typescript
removeBanner() => Promise<void>
```
## Options
Destroy the banner, remove it from screen.
### AdOptions
**Since:** 1.1.2
```ts
interface AdOptions {
adId: string;
adSize?: AdSize;
position?: AdPosition;
}
--------------------
### prepareInterstitial(...)
```typescript
prepareInterstitial(options: AdOptions) => Promise<void>
```
### AdSize
Prepare interstitial banner
```ts
enum AdSize {
BANNER = 'BANNER',
FLUID = 'FLUID',
FULL_BANNER = 'FULL_BANNER',
LARGE_BANNER = 'LARGE_BANNER',
LEADERBOARD = 'LEADERBOARD',
MEDIUM_RECTANGLE = 'MEDIUM_RECTANGLE',
SMART_BANNER = 'SMART_BANNER',
CUSTOM = 'CUSTOM',
}
| Param | Type | Description |
| ------------- | ----------------------------------------------- | ---------------------------------- |
| **`options`** | <code><a href="#adoptions">AdOptions</a></code> | <a href="#adoptions">AdOptions</a> |
**Since:** 1.1.2
--------------------
### showInterstitial()
```typescript
showInterstitial() => Promise<void>
```
### AdPosition
Show interstitial ad when it’s ready
```ts
enum AdPosition {
TOP_CENTER = 'TOP_CENTER',
CENTER = 'CENTER',
BOTTOM_CENTER = 'BOTTOM_CENTER',
}
**Since:** 1.1.2
--------------------
### prepareRewardVideoAd(...)
```typescript
prepareRewardVideoAd(options: AdOptions) => Promise<void>
```
Prepare a reward video ad
| Param | Type | Description |
| ------------- | ----------------------------------------------- | ---------------------------------- |
| **`options`** | <code><a href="#adoptions">AdOptions</a></code> | <a href="#adoptions">AdOptions</a> |
**Since:** 1.1.2
--------------------
### showRewardVideoAd()
```typescript
showRewardVideoAd() => Promise<AdMobRewardItem>
```
Show a reward video ad
**Returns:** <code>Promise&lt;<a href="#admobrewarditem">AdMobRewardItem</a>&gt;</code>
**Since:** 1.1.2
--------------------
### addListener(...)
```typescript
addListener(eventName: 'bannerViewChangeSize', listenerFunc: (info: AdMobBannerSize) => void) => PluginListenerHandle
```
| Param | Type | Description |
| ------------------ | ------------------------------------------------------------------------------ | -------------------- |
| **`eventName`** | <code>"bannerViewChangeSize"</code> | bannerViewChangeSize |
| **`listenerFunc`** | <code>(info: <a href="#admobbannersize">AdMobBannerSize</a>) =&gt; void</code> | |
**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Since:** 3.0.0
--------------------
### addListener(...)
```typescript
addListener(eventName: 'bannerViewDidReceiveAd', listenerFunc: () => void) => PluginListenerHandle
```
Notice: request loaded Banner ad
| Param | Type | Description |
| ------------------ | ------------------------------------- | ---------------------- |
| **`eventName`** | <code>"bannerViewDidReceiveAd"</code> | bannerViewDidReceiveAd |
| **`listenerFunc`** | <code>() =&gt; void</code> | |
**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Since:** 3.0.0
--------------------
### addListener(...)
```typescript
addListener(eventName: 'bannerView:didFailToReceiveAdWithError', listenerFunc: (info: AdMobError) => void) => PluginListenerHandle
```
Notice: request failed Banner ad
| Param | Type | Description |
| ------------------ | -------------------------------------------------------------------- | -------------------------------------- |
| **`eventName`** | <code>"bannerView:didFailToReceiveAdWithError"</code> | bannerView:didFailToReceiveAdWithError |
| **`listenerFunc`** | <code>(info: <a href="#admoberror">AdMobError</a>) =&gt; void</code> | |
**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Since:** 3.0.0
--------------------
### addListener(...)
```typescript
addListener(eventName: 'bannerViewWillPresentScreen', listenerFunc: (info: any) => void) => PluginListenerHandle
```
Notice: full-screen banner view will be presented in response to the user clicking on an ad.
| Param | Type | Description |
| ------------------ | ------------------------------------------ | --------------------------- |
| **`eventName`** | <code>"bannerViewWillPresentScreen"</code> | bannerViewWillPresentScreen |
| **`listenerFunc`** | <code>(info: any) =&gt; void</code> | |
**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Since:** 3.0.0
--------------------
### addListener(...)
```typescript
addListener(eventName: 'bannerViewWillDismissScreen', listenerFunc: (info: any) => void) => PluginListenerHandle
```
Notice: The full-screen banner view will be dismissed.
| Param | Type | Description |
| ------------------ | ------------------------------------------ | --------------------------- |
| **`eventName`** | <code>"bannerViewWillDismissScreen"</code> | bannerViewWillDismissScreen |
| **`listenerFunc`** | <code>(info: any) =&gt; void</code> | |
**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Since:** 3.0.0
--------------------
### addListener(...)
```typescript
addListener(eventName: 'bannerViewWillDismissScreen', listenerFunc: (info: any) => void) => PluginListenerHandle
```
Notice: The full-screen banner view will been dismissed.
| Param | Type | Description |
| ------------------ | ------------------------------------------ | --------------------------- |
| **`eventName`** | <code>"bannerViewWillDismissScreen"</code> | bannerViewWillDismissScreen |
| **`listenerFunc`** | <code>(info: any) =&gt; void</code> | |
**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Since:** 3.0.0
--------------------
### addListener(...)
```typescript
addListener(eventName: 'bannerViewDidDismissScreen', listenerFunc: (info: any) => void) => PluginListenerHandle
```
Notice: The full-screen banner view has been dismissed.
| Param | Type | Description |
| ------------------ | ----------------------------------------- | -------------------------- |
| **`eventName`** | <code>"bannerViewDidDismissScreen"</code> | bannerViewDidDismissScreen |
| **`listenerFunc`** | <code>(info: any) =&gt; void</code> | |
**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Since:** 3.0.0
--------------------
### addListener(...)
```typescript
addListener(eventName: 'adDidPresentFullScreenContent', listenerFunc: (info: any) => void) => PluginListenerHandle
```
Notice: Interstitial ad opened
| Param | Type | Description |
| ------------------ | -------------------------------------------- | ----------------------------- |
| **`eventName`** | <code>"adDidPresentFullScreenContent"</code> | adDidPresentFullScreenContent |
| **`listenerFunc`** | <code>(info: any) =&gt; void</code> | |
**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Since:** 3.0.0
--------------------
### addListener(...)
```typescript
addListener(eventName: 'adDidDismissFullScreenContent', listenerFunc: (info: any) => void) => PluginListenerHandle
```
Notice: Dismiss Content
| Param | Type | Description |
| ------------------ | -------------------------------------------- | ----------------------------- |
| **`eventName`** | <code>"adDidDismissFullScreenContent"</code> | adDidDismissFullScreenContent |
| **`listenerFunc`** | <code>(info: any) =&gt; void</code> | |
**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Since:** 3.0.0
--------------------
### addListener(...)
```typescript
addListener(eventName: 'didFailToPresentFullScreenContentWithError', listenerFunc: (info: AdMobError) => void) => PluginListenerHandle
```
Notice: Interstitial ad is be failed to open
| Param | Type | Description |
| ------------------ | -------------------------------------------------------------------- | ------------------------------------------ |
| **`eventName`** | <code>"didFailToPresentFullScreenContentWithError"</code> | didFailToPresentFullScreenContentWithError |
| **`listenerFunc`** | <code>(info: <a href="#admoberror">AdMobError</a>) =&gt; void</code> | |
**Returns:** <code><a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
**Since:** 3.0.0
--------------------
### Interfaces
#### AdMobInitializationOptions
| Prop | Type | Description | Default | Since |
| ---------------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- |
| **`requestTrackingAuthorization`** | <code>boolean</code> | Use or not requestTrackingAuthorization in iOS(&gt;14) | | 1.1.2 |
| **`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 |
| **`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 |
#### AdOptions
| Prop | Type | Description | Default | Since |
| --------------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | ----- |
| **`adId`** | <code>string</code> | The ad unit ID that you want to request | | 1.1.2 |
| **`adSize`** | <code><a href="#adsize">AdSize</a></code> | Banner Ad Size, defaults to SMART_BANNER. IT can be: SMART_BANNER, BANNER, MEDIUM_RECTANGLE, FULL_BANNER, LEADERBOARD, SKYSCRAPER, or CUSTOM | <code>SMART_BANNER</code> | 1.1.2 |
| **`position`** | <code><a href="#adposition">AdPosition</a></code> | Set Banner Ad position. TOP_CENTER or CENTER or BOTTOM_CENTER | <code>TOP_CENTER</code> | 1.1.2 |
| **`isTesting`** | <code>boolean</code> | You can use test mode of ad. | <code>false</code> | 1.1.2 |
| **`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 |
| **`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 |
#### AdMobRewardItem
For more information
https://developers.google.com/admob/android/rewarded-video-adapters?hl=en
| Prop | Type | Description |
| ------------ | ------------------- | ------------------------ |
| **`type`** | <code>string</code> | Rewarded type user got |
| **`amount`** | <code>number</code> | Rewarded amount user got |
#### PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |
#### AdMobBannerSize
When notice listener of OnAdLoaded, you can get banner size.
| Prop | Type |
| ------------ | ------------------- |
| **`width`** | <code>number</code> |
| **`height`** | <code>number</code> |
#### AdMobError
For more information
https://developers.google.com/android/reference/com/google/android/gms/ads/AdError
| Prop | Type | Description |
| ------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **`code`** | <code>number</code> | Gets the error's code. |
| **`message`** | <code>string</code> | Gets the message describing the error. |
| **`cause`** | <code>string</code> | Gets the cause of this error or null if the cause is nonexistent or unknown. |
| **`domain`** | <code>string</code> | Gets the domain of the error. MobileAds.ERROR_DOMAIN for Google Mobile Ads SDK errors, or a domain defined by mediation networks for mediation errors. |
### Enums
#### AdSize
| Members | Value | Description |
| ---------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **`BANNER`** | <code>'BANNER'</code> | Mobile Marketing Association (MMA) banner ad size (320x50 density-independent pixels). |
| **`FLUID`** | <code>'FLUID'</code> | A dynamically sized banner that matches its parent's width and expands/contracts its height to match the ad's content after loading completes. |
| **`FULL_BANNER`** | <code>'FULL_BANNER'</code> | Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels). |
| **`LARGE_BANNER`** | <code>'LARGE_BANNER'</code> | Large banner ad size (320x100 density-independent pixels). |
| **`LEADERBOARD`** | <code>'LEADERBOARD'</code> | Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels). |
| **`MEDIUM_RECTANGLE`** | <code>'MEDIUM_RECTANGLE'</code> | Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent pixels). |
| **`SMART_BANNER`** | <code>'SMART_BANNER'</code> | deprecated: A dynamically sized banner that is full-width and auto-height. |
| **`ADAPTIVE_BANNER`** | <code>'ADAPTIVE_BANNER'</code> | A dynamically sized banner that is full-width and auto-height. |
| **`CUSTOM`** | <code>'CUSTOM'</code> | To define a custom banner size, set your desired <a href="#adsize">AdSize</a> |
#### AdPosition
| Members | Value | Description |
| ------------------- | ---------------------------- | ----------------------------------------- |
| **`TOP_CENTER`** | <code>'TOP_CENTER'</code> | Banner position be top-center |
| **`CENTER`** | <code>'CENTER'</code> | Banner position be center |
| **`BOTTOM_CENTER`** | <code>'BOTTOM_CENTER'</code> | Banner position be bottom-center(default) |
</docgen-api>
## TROUBLE SHOOTING

@@ -420,0 +757,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc