@capacitor-community/admob 8.0.1 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CapacitorCommunityAdmob.podspec +1 -1
- package/Package.swift +1 -1
- package/README.md +470 -186
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/getcapacitor/community/admob/appopen/AppOpenAdManager.kt +7 -1
- package/android/src/main/java/com/getcapacitor/community/admob/appopen/AppOpenAdPlugin.kt +26 -8
- package/android/src/main/java/com/getcapacitor/community/admob/appopen/AppOpenAdPluginEvents.kt +1 -0
- package/android/src/main/java/com/getcapacitor/community/admob/banner/BannerAdPluginEvents.kt +2 -1
- package/android/src/main/java/com/getcapacitor/community/admob/banner/BannerExecutor.java +79 -29
- package/android/src/main/java/com/getcapacitor/community/admob/helpers/FullscreenPluginCallback.kt +7 -2
- package/android/src/main/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutor.java +21 -3
- package/android/src/main/java/com/getcapacitor/community/admob/interstitial/InterstitialAdCallbackAndListeners.kt +12 -2
- package/android/src/main/java/com/getcapacitor/community/admob/interstitial/InterstitialAdPluginPluginEvent.kt +1 -0
- package/android/src/main/java/com/getcapacitor/community/admob/models/AdMobRevenueData.kt +15 -0
- package/android/src/main/java/com/getcapacitor/community/admob/rewarded/AdRewardExecutor.java +20 -3
- package/android/src/main/java/com/getcapacitor/community/admob/rewarded/RewardAdPluginEvents.kt +1 -0
- package/android/src/main/java/com/getcapacitor/community/admob/rewarded/RewardedAdCallbackAndListeners.kt +14 -4
- package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/AdRewardInterstitialExecutor.java +20 -3
- package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/RewardInterstitialAdPluginEvents.kt +1 -0
- package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/RewardedInterstitialAdCallbackAndListeners.kt +14 -3
- package/dist/docs.json +511 -178
- package/dist/esm/app-open/app-open-ad-options.interface.d.ts +6 -0
- package/dist/esm/app-open/app-open-ad-plugin-events.enum.d.ts +20 -1
- package/dist/esm/app-open/app-open-ad-plugin-events.enum.js +19 -0
- package/dist/esm/app-open/app-open-ad-plugin-events.enum.js.map +1 -1
- package/dist/esm/app-open/app-open-definitions.interface.d.ts +31 -8
- package/dist/esm/banner/banner-ad-options.interface.d.ts +5 -6
- package/dist/esm/banner/banner-ad-plugin-events.enum.d.ts +17 -4
- package/dist/esm/banner/banner-ad-plugin-events.enum.js +16 -3
- package/dist/esm/banner/banner-ad-plugin-events.enum.js.map +1 -1
- package/dist/esm/banner/banner-ad-position.enum.d.ts +3 -3
- package/dist/esm/banner/banner-ad-position.enum.js +3 -3
- package/dist/esm/banner/banner-ad-size.enum.d.ts +4 -3
- package/dist/esm/banner/banner-ad-size.enum.js +4 -3
- package/dist/esm/banner/banner-ad-size.enum.js.map +1 -1
- package/dist/esm/banner/banner-definitions.interface.d.ts +17 -10
- package/dist/esm/banner/banner-size.interface.d.ts +8 -1
- package/dist/esm/definitions.d.ts +17 -16
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/interstitial/interstitial-ad-plugin-events.enum.d.ts +10 -6
- package/dist/esm/interstitial/interstitial-ad-plugin-events.enum.js +9 -5
- package/dist/esm/interstitial/interstitial-ad-plugin-events.enum.js.map +1 -1
- package/dist/esm/interstitial/interstitial-definitions.interface.d.ts +24 -4
- package/dist/esm/reward/reward-ad-options.interface.d.ts +7 -6
- package/dist/esm/reward/reward-ad-plugin-events.enum.d.ts +13 -12
- package/dist/esm/reward/reward-ad-plugin-events.enum.js +12 -11
- package/dist/esm/reward/reward-ad-plugin-events.enum.js.map +1 -1
- package/dist/esm/reward/reward-definitions.interface.d.ts +27 -4
- package/dist/esm/reward/reward-item.interface.d.ts +3 -4
- package/dist/esm/reward-interstitial/reward-interstitial-ad-options.interface.d.ts +7 -6
- package/dist/esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.d.ts +13 -12
- package/dist/esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.js +12 -11
- package/dist/esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.js.map +1 -1
- package/dist/esm/reward-interstitial/reward-interstitial-definitions.interface.d.ts +30 -7
- package/dist/esm/reward-interstitial/reward-interstitial-item.interface.d.ts +3 -4
- package/dist/esm/shared/ad-load-info.interface.d.ts +6 -0
- package/dist/esm/shared/ad-mob-revenue-data.interface.d.ts +50 -0
- package/dist/esm/shared/ad-mob-revenue-data.interface.js +23 -0
- package/dist/esm/shared/ad-mob-revenue-data.interface.js.map +1 -0
- package/dist/esm/shared/ad-options.interface.d.ts +9 -11
- package/dist/esm/shared/ad-show-options.interface.d.ts +12 -0
- package/dist/esm/shared/ad-show-options.interface.js +2 -0
- package/dist/esm/shared/ad-show-options.interface.js.map +1 -0
- package/dist/esm/shared/admob-error.interface.d.ts +3 -2
- package/dist/esm/shared/index.d.ts +2 -0
- package/dist/esm/shared/index.js +2 -0
- package/dist/esm/shared/index.js.map +1 -1
- package/dist/esm/shared/tracking-authorization-status.interface.d.ts +6 -1
- package/dist/esm/web.d.ts +6 -6
- package/dist/esm/web.js +11 -6
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +109 -42
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +109 -42
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/AdMobPlugin/AppOpen/AppOpenAdManager.swift +12 -1
- package/ios/Sources/AdMobPlugin/AppOpen/AppOpenAdPlugin.swift +40 -10
- package/ios/Sources/AdMobPlugin/AppOpen/AppOpenAdPluginEvents.swift +1 -0
- package/ios/Sources/AdMobPlugin/Banner/BannerAdPluginEvents.swift +1 -0
- package/ios/Sources/AdMobPlugin/Banner/BannerExecutor.swift +14 -0
- package/ios/Sources/AdMobPlugin/Interstitial/AdInterstitialExecutor.swift +41 -5
- package/ios/Sources/AdMobPlugin/Interstitial/InterstitialAdPluginEvents.swift +1 -0
- package/ios/Sources/AdMobPlugin/Rewarded/AdRewardExecutor.swift +44 -5
- package/ios/Sources/AdMobPlugin/Rewarded/RewardAdPluginEvents.swift +1 -0
- package/ios/Sources/AdMobPlugin/RewardedInterstitial/AdRewardInterstitialExecutor.swift +45 -6
- package/ios/Sources/AdMobPlugin/RewardedInterstitial/RewardInterstitialAdPluginEvents.swift +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
export declare enum AppOpenAdPluginEvents {
|
|
2
|
+
/**
|
|
3
|
+
* Emits when an App Open ad has loaded.
|
|
4
|
+
*/
|
|
2
5
|
Loaded = "appOpenAdLoaded",
|
|
6
|
+
/**
|
|
7
|
+
* Emits when an App Open ad fails to load.
|
|
8
|
+
*/
|
|
3
9
|
FailedToLoad = "appOpenAdFailedToLoad",
|
|
10
|
+
/**
|
|
11
|
+
* Emits when an App Open ad is shown.
|
|
12
|
+
*/
|
|
4
13
|
Opened = "appOpenAdOpened",
|
|
14
|
+
/**
|
|
15
|
+
* Emits when an App Open ad is dismissed.
|
|
16
|
+
*/
|
|
5
17
|
Closed = "appOpenAdClosed",
|
|
6
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Emits when a loaded App Open ad fails to show.
|
|
20
|
+
*/
|
|
21
|
+
FailedToShow = "appOpenAdFailedToShow",
|
|
22
|
+
/**
|
|
23
|
+
* Emits impression-level ad revenue data when a paid event is recorded.
|
|
24
|
+
*/
|
|
25
|
+
AdImpression = "appOpenAdImpression"
|
|
7
26
|
}
|
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
export var AppOpenAdPluginEvents;
|
|
2
2
|
(function (AppOpenAdPluginEvents) {
|
|
3
|
+
/**
|
|
4
|
+
* Emits when an App Open ad has loaded.
|
|
5
|
+
*/
|
|
3
6
|
AppOpenAdPluginEvents["Loaded"] = "appOpenAdLoaded";
|
|
7
|
+
/**
|
|
8
|
+
* Emits when an App Open ad fails to load.
|
|
9
|
+
*/
|
|
4
10
|
AppOpenAdPluginEvents["FailedToLoad"] = "appOpenAdFailedToLoad";
|
|
11
|
+
/**
|
|
12
|
+
* Emits when an App Open ad is shown.
|
|
13
|
+
*/
|
|
5
14
|
AppOpenAdPluginEvents["Opened"] = "appOpenAdOpened";
|
|
15
|
+
/**
|
|
16
|
+
* Emits when an App Open ad is dismissed.
|
|
17
|
+
*/
|
|
6
18
|
AppOpenAdPluginEvents["Closed"] = "appOpenAdClosed";
|
|
19
|
+
/**
|
|
20
|
+
* Emits when a loaded App Open ad fails to show.
|
|
21
|
+
*/
|
|
7
22
|
AppOpenAdPluginEvents["FailedToShow"] = "appOpenAdFailedToShow";
|
|
23
|
+
/**
|
|
24
|
+
* Emits impression-level ad revenue data when a paid event is recorded.
|
|
25
|
+
*/
|
|
26
|
+
AppOpenAdPluginEvents["AdImpression"] = "appOpenAdImpression";
|
|
8
27
|
})(AppOpenAdPluginEvents || (AppOpenAdPluginEvents = {}));
|
|
9
28
|
//# sourceMappingURL=app-open-ad-plugin-events.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-open-ad-plugin-events.enum.js","sourceRoot":"","sources":["../../../src/app-open/app-open-ad-plugin-events.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"app-open-ad-plugin-events.enum.js","sourceRoot":"","sources":["../../../src/app-open/app-open-ad-plugin-events.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,qBA8BX;AA9BD,WAAY,qBAAqB;IAC/B;;OAEG;IACH,mDAA0B,CAAA;IAE1B;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,mDAA0B,CAAA;IAE1B;;OAEG;IACH,mDAA0B,CAAA;IAE1B;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,6DAAoC,CAAA;AACtC,CAAC,EA9BW,qBAAqB,KAArB,qBAAqB,QA8BhC"}
|
|
@@ -1,27 +1,50 @@
|
|
|
1
1
|
import type { PluginListenerHandle } from '@capacitor/core';
|
|
2
2
|
import type { ValidateAllEventsEnumAreImplemented } from '../private/validate-all-events-implemented.type';
|
|
3
|
-
import type { AdMobError } from '../shared';
|
|
3
|
+
import type { AdLoadInfo, AdMobError, AdMobRevenueData, AdShowOptions } from '../shared';
|
|
4
4
|
import type { AppOpenAdOptions } from './app-open-ad-options.interface';
|
|
5
5
|
import type { AppOpenAdPluginEvents } from './app-open-ad-plugin-events.enum';
|
|
6
6
|
export type AppOpenDefinitionsHasAllEvents = ValidateAllEventsEnumAreImplemented<AppOpenAdPluginEvents, AppOpenAdPlugin>;
|
|
7
7
|
export interface AppOpenAdPlugin {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Loads an App Open ad and returns the loaded ad unit ID.
|
|
10
10
|
*/
|
|
11
|
-
loadAppOpen(options: AppOpenAdOptions): Promise<
|
|
11
|
+
loadAppOpen(options: AppOpenAdOptions): Promise<AdLoadInfo>;
|
|
12
12
|
/**
|
|
13
|
-
* Shows
|
|
13
|
+
* Shows a loaded App Open ad.
|
|
14
|
+
*
|
|
15
|
+
* @param options Optional. Pass { adId } to show a specific prepared ad instead of the most recent one.
|
|
14
16
|
*/
|
|
15
|
-
showAppOpen(): Promise<void>;
|
|
17
|
+
showAppOpen(options?: AdShowOptions): Promise<void>;
|
|
16
18
|
/**
|
|
17
|
-
*
|
|
19
|
+
* Checks whether an App Open ad is loaded.
|
|
20
|
+
*
|
|
21
|
+
* @param options Optional. Pass an adId to check a specific prepared ad instead of the most recent one.
|
|
18
22
|
*/
|
|
19
|
-
isAppOpenLoaded(): Promise<{
|
|
23
|
+
isAppOpenLoaded(options?: AdShowOptions): Promise<{
|
|
20
24
|
value: boolean;
|
|
21
25
|
}>;
|
|
22
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Listens for App Open ad load events.
|
|
28
|
+
*/
|
|
29
|
+
addListener(eventName: AppOpenAdPluginEvents.Loaded, listenerFunc: (info: AdLoadInfo) => void): Promise<PluginListenerHandle>;
|
|
30
|
+
/**
|
|
31
|
+
* Listens for App Open ad load failures.
|
|
32
|
+
*/
|
|
23
33
|
addListener(eventName: AppOpenAdPluginEvents.FailedToLoad, listenerFunc: (error: AdMobError) => void): Promise<PluginListenerHandle>;
|
|
34
|
+
/**
|
|
35
|
+
* Listens for App Open ad opened events.
|
|
36
|
+
*/
|
|
24
37
|
addListener(eventName: AppOpenAdPluginEvents.Opened, listenerFunc: () => void): Promise<PluginListenerHandle>;
|
|
38
|
+
/**
|
|
39
|
+
* Listens for App Open ad closed events.
|
|
40
|
+
*/
|
|
25
41
|
addListener(eventName: AppOpenAdPluginEvents.Closed, listenerFunc: () => void): Promise<PluginListenerHandle>;
|
|
42
|
+
/**
|
|
43
|
+
* Listens for App Open ad show failures.
|
|
44
|
+
*/
|
|
26
45
|
addListener(eventName: AppOpenAdPluginEvents.FailedToShow, listenerFunc: (error: AdMobError) => void): Promise<PluginListenerHandle>;
|
|
46
|
+
/**
|
|
47
|
+
* Listens for App Open impression-level ad revenue events.
|
|
48
|
+
*/
|
|
49
|
+
addListener(eventName: AppOpenAdPluginEvents.AdImpression, listenerFunc: (data: AdMobRevenueData) => void): Promise<PluginListenerHandle>;
|
|
27
50
|
}
|
|
@@ -2,21 +2,20 @@ import type { AdOptions } from '../shared';
|
|
|
2
2
|
import type { BannerAdPosition } from './banner-ad-position.enum';
|
|
3
3
|
import type { BannerAdSize } from './banner-ad-size.enum';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Options for displaying a banner ad.
|
|
6
|
+
*
|
|
7
|
+
* This interface extends AdOptions.
|
|
6
8
|
*/
|
|
7
9
|
export interface BannerAdOptions extends AdOptions {
|
|
8
10
|
/**
|
|
9
|
-
*
|
|
10
|
-
* IT can be: ADAPTIVE_BANNER, SMART_BANNER, BANNER,
|
|
11
|
-
* MEDIUM_RECTANGLE, FULL_BANNER, LEADERBOARD
|
|
11
|
+
* The banner size to display.
|
|
12
12
|
*
|
|
13
13
|
* @default ADAPTIVE_BANNER
|
|
14
14
|
* @since 3.0.0
|
|
15
15
|
*/
|
|
16
16
|
adSize?: BannerAdSize;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
* TOP_CENTER or CENTER or BOTTOM_CENTER
|
|
18
|
+
* The position where the banner is displayed.
|
|
20
19
|
*
|
|
21
20
|
* @default TOP_CENTER
|
|
22
21
|
* @since 1.1.2
|
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
export declare enum BannerAdPluginEvents {
|
|
2
|
+
/**
|
|
3
|
+
* Emits when the displayed banner size changes.
|
|
4
|
+
*/
|
|
2
5
|
SizeChanged = "bannerAdSizeChanged",
|
|
6
|
+
/**
|
|
7
|
+
* Emits when a banner ad has loaded.
|
|
8
|
+
*/
|
|
3
9
|
Loaded = "bannerAdLoaded",
|
|
10
|
+
/**
|
|
11
|
+
* Emits when a banner ad fails to load.
|
|
12
|
+
*/
|
|
4
13
|
FailedToLoad = "bannerAdFailedToLoad",
|
|
5
14
|
/**
|
|
6
|
-
*
|
|
15
|
+
* Emits when a banner opens an overlay after the user taps it.
|
|
7
16
|
*/
|
|
8
17
|
Opened = "bannerAdOpened",
|
|
9
18
|
/**
|
|
10
|
-
*
|
|
19
|
+
* Emits when the banner overlay is closed.
|
|
11
20
|
*/
|
|
12
21
|
Closed = "bannerAdClosed",
|
|
13
22
|
/**
|
|
14
|
-
*
|
|
23
|
+
* Emits when an impression is recorded for the banner ad.
|
|
24
|
+
*/
|
|
25
|
+
AdImpression = "bannerAdImpression",
|
|
26
|
+
/**
|
|
27
|
+
* Emits impression-level ad revenue data when a paid event is recorded.
|
|
15
28
|
*/
|
|
16
|
-
|
|
29
|
+
AdPaid = "bannerAdPaid"
|
|
17
30
|
}
|
|
@@ -1,20 +1,33 @@
|
|
|
1
1
|
// This enum should be keep in sync with their native equivalents with the same name
|
|
2
2
|
export var BannerAdPluginEvents;
|
|
3
3
|
(function (BannerAdPluginEvents) {
|
|
4
|
+
/**
|
|
5
|
+
* Emits when the displayed banner size changes.
|
|
6
|
+
*/
|
|
4
7
|
BannerAdPluginEvents["SizeChanged"] = "bannerAdSizeChanged";
|
|
8
|
+
/**
|
|
9
|
+
* Emits when a banner ad has loaded.
|
|
10
|
+
*/
|
|
5
11
|
BannerAdPluginEvents["Loaded"] = "bannerAdLoaded";
|
|
12
|
+
/**
|
|
13
|
+
* Emits when a banner ad fails to load.
|
|
14
|
+
*/
|
|
6
15
|
BannerAdPluginEvents["FailedToLoad"] = "bannerAdFailedToLoad";
|
|
7
16
|
/**
|
|
8
|
-
*
|
|
17
|
+
* Emits when a banner opens an overlay after the user taps it.
|
|
9
18
|
*/
|
|
10
19
|
BannerAdPluginEvents["Opened"] = "bannerAdOpened";
|
|
11
20
|
/**
|
|
12
|
-
*
|
|
21
|
+
* Emits when the banner overlay is closed.
|
|
13
22
|
*/
|
|
14
23
|
BannerAdPluginEvents["Closed"] = "bannerAdClosed";
|
|
15
24
|
/**
|
|
16
|
-
*
|
|
25
|
+
* Emits when an impression is recorded for the banner ad.
|
|
17
26
|
*/
|
|
18
27
|
BannerAdPluginEvents["AdImpression"] = "bannerAdImpression";
|
|
28
|
+
/**
|
|
29
|
+
* Emits impression-level ad revenue data when a paid event is recorded.
|
|
30
|
+
*/
|
|
31
|
+
BannerAdPluginEvents["AdPaid"] = "bannerAdPaid";
|
|
19
32
|
})(BannerAdPluginEvents || (BannerAdPluginEvents = {}));
|
|
20
33
|
//# sourceMappingURL=banner-ad-plugin-events.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner-ad-plugin-events.enum.js","sourceRoot":"","sources":["../../../src/banner/banner-ad-plugin-events.enum.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"banner-ad-plugin-events.enum.js","sourceRoot":"","sources":["../../../src/banner/banner-ad-plugin-events.enum.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,CAAN,IAAY,oBAmCX;AAnCD,WAAY,oBAAoB;IAC9B;;OAEG;IACH,2DAAmC,CAAA;IAEnC;;OAEG;IACH,iDAAyB,CAAA;IAEzB;;OAEG;IACH,6DAAqC,CAAA;IAErC;;OAEG;IACH,iDAAyB,CAAA;IAEzB;;OAEG;IACH,iDAAyB,CAAA;IAEzB;;OAEG;IACH,2DAAmC,CAAA;IAEnC;;OAEG;IACH,+CAAuB,CAAA;AACzB,CAAC,EAnCW,oBAAoB,KAApB,oBAAoB,QAmC/B"}
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare enum BannerAdPosition {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Positions the banner at the top center of the screen.
|
|
7
7
|
*/
|
|
8
8
|
TOP_CENTER = "TOP_CENTER",
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Positions the banner at the center of the screen.
|
|
11
11
|
*/
|
|
12
12
|
CENTER = "CENTER",
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Positions the banner at the bottom center of the screen.
|
|
15
15
|
*/
|
|
16
16
|
BOTTOM_CENTER = "BOTTOM_CENTER"
|
|
17
17
|
}
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
export var BannerAdPosition;
|
|
5
5
|
(function (BannerAdPosition) {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Positions the banner at the top center of the screen.
|
|
8
8
|
*/
|
|
9
9
|
BannerAdPosition["TOP_CENTER"] = "TOP_CENTER";
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Positions the banner at the center of the screen.
|
|
12
12
|
*/
|
|
13
13
|
BannerAdPosition["CENTER"] = "CENTER";
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Positions the banner at the bottom center of the screen.
|
|
16
16
|
*/
|
|
17
17
|
BannerAdPosition["BOTTOM_CENTER"] = "BOTTOM_CENTER";
|
|
18
18
|
})(BannerAdPosition || (BannerAdPosition = {}));
|
|
@@ -34,9 +34,10 @@ export declare enum BannerAdSize {
|
|
|
34
34
|
*/
|
|
35
35
|
ADAPTIVE_BANNER = "ADAPTIVE_BANNER",
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* A legacy smart banner sized to the screen width.
|
|
38
|
+
* Retained for compatibility; use `ADAPTIVE_BANNER` for new integrations.
|
|
39
|
+
*
|
|
40
|
+
* @deprecated Use `ADAPTIVE_BANNER` instead.
|
|
40
41
|
*/
|
|
41
42
|
SMART_BANNER = "SMART_BANNER"
|
|
42
43
|
}
|
|
@@ -35,9 +35,10 @@ export var BannerAdSize;
|
|
|
35
35
|
*/
|
|
36
36
|
BannerAdSize["ADAPTIVE_BANNER"] = "ADAPTIVE_BANNER";
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
38
|
+
* A legacy smart banner sized to the screen width.
|
|
39
|
+
* Retained for compatibility; use `ADAPTIVE_BANNER` for new integrations.
|
|
40
|
+
*
|
|
41
|
+
* @deprecated Use `ADAPTIVE_BANNER` instead.
|
|
41
42
|
*/
|
|
42
43
|
BannerAdSize["SMART_BANNER"] = "SMART_BANNER";
|
|
43
44
|
})(BannerAdSize || (BannerAdSize = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner-ad-size.enum.js","sourceRoot":"","sources":["../../../src/banner/banner-ad-size.enum.ts"],"names":[],"mappings":"AAAA;;;;;KAKK;AACJ,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"banner-ad-size.enum.js","sourceRoot":"","sources":["../../../src/banner/banner-ad-size.enum.ts"],"names":[],"mappings":"AAAA;;;;;KAKK;AACJ,MAAM,CAAN,IAAY,YA2CZ;AA3CA,WAAY,YAAY;IACvB;;;OAGG;IACH,iCAAiB,CAAA;IAEjB;;;OAGG;IACH,2CAA2B,CAAA;IAE3B;;OAEG;IACH,6CAA6B,CAAA;IAE7B;;;OAGG;IACF,qDAAqC,CAAA;IAEtC;;;OAGG;IACH,2CAA2B,CAAA;IAE3B;;OAEG;IACF,mDAAmC,CAAA;IAEnC;;;;;OAKG;IACH,6CAA6B,CAAA;AAEhC,CAAC,EA3CY,YAAY,KAAZ,YAAY,QA2CxB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { PluginListenerHandle } from '@capacitor/core';
|
|
2
2
|
import type { ValidateAllEventsEnumAreImplemented } from '../private/validate-all-events-implemented.type';
|
|
3
|
-
import type { AdMobError } from '../shared';
|
|
3
|
+
import type { AdMobError, AdMobRevenueData } from '../shared';
|
|
4
4
|
import type { BannerAdOptions } from './banner-ad-options.interface';
|
|
5
5
|
import type { BannerAdPluginEvents } from './banner-ad-plugin-events.enum';
|
|
6
6
|
import type { AdMobBannerSize } from './banner-size.interface';
|
|
7
7
|
export type BannerDefinitionsHasAllEvents = ValidateAllEventsEnumAreImplemented<BannerAdPluginEvents, BannerDefinitions>;
|
|
8
8
|
export interface BannerDefinitions {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Displays a banner ad.
|
|
11
11
|
*
|
|
12
12
|
* @group Banner
|
|
13
13
|
* @param options AdOptions
|
|
@@ -15,27 +15,28 @@ export interface BannerDefinitions {
|
|
|
15
15
|
*/
|
|
16
16
|
showBanner(options: BannerAdOptions): Promise<void>;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Hides the current banner without destroying it.
|
|
19
19
|
*
|
|
20
20
|
* @group Banner
|
|
21
21
|
* @since 1.1.2
|
|
22
22
|
*/
|
|
23
23
|
hideBanner(): Promise<void>;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Shows a previously hidden banner.
|
|
26
26
|
*
|
|
27
27
|
* @group Banner
|
|
28
28
|
* @since 1.1.2
|
|
29
29
|
*/
|
|
30
30
|
resumeBanner(): Promise<void>;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Destroys the current banner and removes it from the screen.
|
|
33
33
|
*
|
|
34
34
|
* @group Banner
|
|
35
35
|
* @since 1.1.2
|
|
36
36
|
*/
|
|
37
37
|
removeBanner(): Promise<void>;
|
|
38
38
|
/**
|
|
39
|
+
* Listens for changes to the displayed banner dimensions.
|
|
39
40
|
*
|
|
40
41
|
* @group Banner
|
|
41
42
|
* @param eventName bannerAdSizeChanged
|
|
@@ -44,7 +45,7 @@ export interface BannerDefinitions {
|
|
|
44
45
|
*/
|
|
45
46
|
addListener(eventName: BannerAdPluginEvents.SizeChanged, listenerFunc: (info: AdMobBannerSize) => void): Promise<PluginListenerHandle>;
|
|
46
47
|
/**
|
|
47
|
-
*
|
|
48
|
+
* Listens for banner ad load events.
|
|
48
49
|
*
|
|
49
50
|
* @group Banner
|
|
50
51
|
* @param eventName bannerAdLoaded
|
|
@@ -53,7 +54,7 @@ export interface BannerDefinitions {
|
|
|
53
54
|
*/
|
|
54
55
|
addListener(eventName: BannerAdPluginEvents.Loaded, listenerFunc: () => void): Promise<PluginListenerHandle>;
|
|
55
56
|
/**
|
|
56
|
-
*
|
|
57
|
+
* Listens for banner ad load failures.
|
|
57
58
|
*
|
|
58
59
|
* @group Banner
|
|
59
60
|
* @param eventName bannerAdFailedToLoad
|
|
@@ -62,7 +63,7 @@ export interface BannerDefinitions {
|
|
|
62
63
|
*/
|
|
63
64
|
addListener(eventName: BannerAdPluginEvents.FailedToLoad, listenerFunc: (info: AdMobError) => void): Promise<PluginListenerHandle>;
|
|
64
65
|
/**
|
|
65
|
-
*
|
|
66
|
+
* Listens for banner overlay opened events.
|
|
66
67
|
*
|
|
67
68
|
* @group Banner
|
|
68
69
|
* @param eventName bannerAdOpened
|
|
@@ -71,7 +72,7 @@ export interface BannerDefinitions {
|
|
|
71
72
|
*/
|
|
72
73
|
addListener(eventName: BannerAdPluginEvents.Opened, listenerFunc: () => void): Promise<PluginListenerHandle>;
|
|
73
74
|
/**
|
|
74
|
-
*
|
|
75
|
+
* Listens for banner overlay closed events.
|
|
75
76
|
*
|
|
76
77
|
* @group Banner
|
|
77
78
|
* @param eventName bannerAdClosed
|
|
@@ -80,7 +81,7 @@ export interface BannerDefinitions {
|
|
|
80
81
|
*/
|
|
81
82
|
addListener(eventName: BannerAdPluginEvents.Closed, listenerFunc: () => void): Promise<PluginListenerHandle>;
|
|
82
83
|
/**
|
|
83
|
-
*
|
|
84
|
+
* Listens for banner impression events.
|
|
84
85
|
*
|
|
85
86
|
* @group Banner
|
|
86
87
|
* @param eventName AdImpression
|
|
@@ -88,4 +89,10 @@ export interface BannerDefinitions {
|
|
|
88
89
|
* @since 3.0.0
|
|
89
90
|
*/
|
|
90
91
|
addListener(eventName: BannerAdPluginEvents.AdImpression, listenerFunc: () => void): Promise<PluginListenerHandle>;
|
|
92
|
+
/**
|
|
93
|
+
* Listens for banner impression-level ad revenue events.
|
|
94
|
+
*
|
|
95
|
+
* @group Banner
|
|
96
|
+
*/
|
|
97
|
+
addListener(eventName: BannerAdPluginEvents.AdPaid, listenerFunc: (data: AdMobRevenueData) => void): Promise<PluginListenerHandle>;
|
|
91
98
|
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The displayed banner dimensions in logical display units (dp on Android and points on iOS).
|
|
3
|
+
* A hidden, removed, or failed banner can report both dimensions as `0`.
|
|
3
4
|
*/
|
|
4
5
|
export interface AdMobBannerSize {
|
|
6
|
+
/**
|
|
7
|
+
* The displayed banner width.
|
|
8
|
+
*/
|
|
5
9
|
width: number;
|
|
10
|
+
/**
|
|
11
|
+
* The displayed banner height.
|
|
12
|
+
*/
|
|
6
13
|
height: number;
|
|
7
14
|
}
|
|
@@ -8,54 +8,55 @@ import type { TrackingAuthorizationStatusInterface } from './shared/tracking-aut
|
|
|
8
8
|
type AdMobDefinitions = BannerDefinitions & RewardDefinitions & RewardInterstitialDefinitions & InterstitialDefinitions & AdmobConsentDefinitions & AppOpenAdPlugin;
|
|
9
9
|
export interface AdMobPlugin extends AdMobDefinitions {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Initializes the Google Mobile Ads SDK.
|
|
12
12
|
*
|
|
13
13
|
* @group Initialize
|
|
14
|
-
* @param options
|
|
14
|
+
* @param options Optional SDK initialization settings.
|
|
15
15
|
* @since 1.1.2
|
|
16
16
|
*/
|
|
17
17
|
initialize(options?: AdMobInitializationOptions): Promise<void>;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Returns the current App Tracking Transparency authorization status on iOS 14 and later.
|
|
20
|
+
* Returns `authorized` on earlier iOS versions, Android, and web.
|
|
20
21
|
*
|
|
21
22
|
* @see https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547038-trackingauthorizationstatus
|
|
22
23
|
* @since 3.1.0
|
|
23
24
|
*/
|
|
24
25
|
trackingAuthorizationStatus(): Promise<TrackingAuthorizationStatusInterface>;
|
|
25
26
|
/**
|
|
26
|
-
*
|
|
27
|
+
* Requests App Tracking Transparency authorization on iOS 14 and later.
|
|
28
|
+
* Resolves without taking action on earlier iOS versions, Android, and web.
|
|
27
29
|
*
|
|
28
|
-
* @see https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547038-
|
|
30
|
+
* @see https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547038-requesttrackingauthorization
|
|
29
31
|
* @since 5.2.0
|
|
30
32
|
*/
|
|
31
33
|
requestTrackingAuthorization(): Promise<void>;
|
|
32
34
|
/**
|
|
33
|
-
*
|
|
35
|
+
* Reports whether the application audio is muted to the Google Mobile Ads SDK.
|
|
34
36
|
*
|
|
35
|
-
* @see https://
|
|
37
|
+
* @see https://developers.google.com/admob/android/global-settings
|
|
36
38
|
* @since 4.1.1
|
|
37
39
|
*/
|
|
38
40
|
setApplicationMuted(options: ApplicationMutedOptions): Promise<void>;
|
|
39
41
|
/**
|
|
40
|
-
*
|
|
42
|
+
* Reports the application audio volume to the Google Mobile Ads SDK.
|
|
41
43
|
*
|
|
42
|
-
* @see https://
|
|
44
|
+
* @see https://developers.google.com/admob/android/global-settings
|
|
43
45
|
* @since 4.1.1
|
|
44
46
|
*/
|
|
45
47
|
setApplicationVolume(options: ApplicationVolumeOptions): Promise<void>;
|
|
46
48
|
}
|
|
47
49
|
export interface AdMobInitializationOptions {
|
|
48
50
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
+
* Device IDs to register as test devices when {@link AdMobInitializationOptions.initializeForTesting} is `true`.
|
|
52
|
+
* Requests from registered devices receive test ads and do not generate invalid traffic.
|
|
51
53
|
*
|
|
52
54
|
* @see https://developers.google.com/admob/android/test-ads#enable_test_devices
|
|
53
55
|
* @since 1.2.0
|
|
54
56
|
*/
|
|
55
57
|
testingDevices?: string[];
|
|
56
58
|
/**
|
|
57
|
-
*
|
|
58
|
-
* be registered to receive test production ads.
|
|
59
|
+
* Whether to register {@link AdMobInitializationOptions.testingDevices} as test devices.
|
|
59
60
|
*
|
|
60
61
|
* @see AdMobInitializationOptions.testingDevices
|
|
61
62
|
* @default false
|
|
@@ -79,8 +80,8 @@ export interface AdMobInitializationOptions {
|
|
|
79
80
|
*/
|
|
80
81
|
tagForUnderAgeOfConsent?: boolean;
|
|
81
82
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
83
|
+
* The maximum ad content rating applied to all ad requests.
|
|
84
|
+
* Ads with a higher rating are excluded.
|
|
84
85
|
*
|
|
85
86
|
* @see https://developers.google.com/admob/android/targeting#child-directed_setting
|
|
86
87
|
* @since 3.1.0
|
|
@@ -120,7 +121,7 @@ export interface ApplicationVolumeOptions {
|
|
|
120
121
|
/**
|
|
121
122
|
* If your app has its own volume controls (such as custom music or sound effect volumes),
|
|
122
123
|
* disclosing app volume to the Google Mobile Ads SDK allows video ads to respect app volume settings.
|
|
123
|
-
*
|
|
124
|
+
* Use a supported value from 0.0 (silent) to 1.0 (full volume).
|
|
124
125
|
*
|
|
125
126
|
* @see https://developers.google.com/admob/android/global-settings
|
|
126
127
|
* @since 4.1.1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AA2GA,MAAM,CAAN,IAAY,kBAoBX;AApBD,WAAY,kBAAkB;IAC5B;;OAEG;IACH,yCAAmB,CAAA;IAEnB;;OAEG;IACH,2DAAqC,CAAA;IAErC;;OAEG;IACH,mCAAa,CAAA;IAEb;;OAEG;IACH,uDAAiC,CAAA;AACnC,CAAC,EApBW,kBAAkB,KAAlB,kBAAkB,QAoB7B"}
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
export declare enum InterstitialAdPluginEvents {
|
|
2
2
|
/**
|
|
3
|
-
* Emits
|
|
3
|
+
* Emits when an interstitial ad has loaded and is ready to show.
|
|
4
4
|
*/
|
|
5
5
|
Loaded = "interstitialAdLoaded",
|
|
6
6
|
/**
|
|
7
|
-
* Emits
|
|
7
|
+
* Emits when an interstitial ad fails to load.
|
|
8
8
|
*/
|
|
9
9
|
FailedToLoad = "interstitialAdFailedToLoad",
|
|
10
10
|
/**
|
|
11
|
-
* Emits when
|
|
11
|
+
* Emits when an interstitial ad is shown.
|
|
12
12
|
*/
|
|
13
13
|
Showed = "interstitialAdShowed",
|
|
14
14
|
/**
|
|
15
|
-
* Emits when
|
|
15
|
+
* Emits when a loaded interstitial ad fails to show.
|
|
16
16
|
*/
|
|
17
17
|
FailedToShow = "interstitialAdFailedToShow",
|
|
18
18
|
/**
|
|
19
|
-
* Emits when
|
|
19
|
+
* Emits when an interstitial ad is dismissed.
|
|
20
20
|
*/
|
|
21
|
-
Dismissed = "interstitialAdDismissed"
|
|
21
|
+
Dismissed = "interstitialAdDismissed",
|
|
22
|
+
/**
|
|
23
|
+
* Emits impression-level ad revenue data when a paid event is recorded.
|
|
24
|
+
*/
|
|
25
|
+
AdImpression = "interstitialAdImpression"
|
|
22
26
|
}
|
|
@@ -2,24 +2,28 @@
|
|
|
2
2
|
export var InterstitialAdPluginEvents;
|
|
3
3
|
(function (InterstitialAdPluginEvents) {
|
|
4
4
|
/**
|
|
5
|
-
* Emits
|
|
5
|
+
* Emits when an interstitial ad has loaded and is ready to show.
|
|
6
6
|
*/
|
|
7
7
|
InterstitialAdPluginEvents["Loaded"] = "interstitialAdLoaded";
|
|
8
8
|
/**
|
|
9
|
-
* Emits
|
|
9
|
+
* Emits when an interstitial ad fails to load.
|
|
10
10
|
*/
|
|
11
11
|
InterstitialAdPluginEvents["FailedToLoad"] = "interstitialAdFailedToLoad";
|
|
12
12
|
/**
|
|
13
|
-
* Emits when
|
|
13
|
+
* Emits when an interstitial ad is shown.
|
|
14
14
|
*/
|
|
15
15
|
InterstitialAdPluginEvents["Showed"] = "interstitialAdShowed";
|
|
16
16
|
/**
|
|
17
|
-
* Emits when
|
|
17
|
+
* Emits when a loaded interstitial ad fails to show.
|
|
18
18
|
*/
|
|
19
19
|
InterstitialAdPluginEvents["FailedToShow"] = "interstitialAdFailedToShow";
|
|
20
20
|
/**
|
|
21
|
-
* Emits when
|
|
21
|
+
* Emits when an interstitial ad is dismissed.
|
|
22
22
|
*/
|
|
23
23
|
InterstitialAdPluginEvents["Dismissed"] = "interstitialAdDismissed";
|
|
24
|
+
/**
|
|
25
|
+
* Emits impression-level ad revenue data when a paid event is recorded.
|
|
26
|
+
*/
|
|
27
|
+
InterstitialAdPluginEvents["AdImpression"] = "interstitialAdImpression";
|
|
24
28
|
})(InterstitialAdPluginEvents || (InterstitialAdPluginEvents = {}));
|
|
25
29
|
//# sourceMappingURL=interstitial-ad-plugin-events.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interstitial-ad-plugin-events.enum.js","sourceRoot":"","sources":["../../../src/interstitial/interstitial-ad-plugin-events.enum.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"interstitial-ad-plugin-events.enum.js","sourceRoot":"","sources":["../../../src/interstitial/interstitial-ad-plugin-events.enum.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,CAAN,IAAY,0BAyBX;AAzBD,WAAY,0BAA0B;IACpC;;OAEG;IACH,6DAA+B,CAAA;IAC/B;;OAEG;IACH,yEAA2C,CAAA;IAC3C;;OAEG;IACH,6DAA+B,CAAA;IAC/B;;OAEG;IACH,yEAA2C,CAAA;IAC3C;;OAEG;IACH,mEAAoC,CAAA;IACpC;;OAEG;IACH,uEAAyC,CAAA;AAC3C,CAAC,EAzBW,0BAA0B,KAA1B,0BAA0B,QAyBrC"}
|