emi-indo-cordova-plugin-admob 2.0.5 → 2.0.7
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/README.md +199 -53
- package/example/capacitor.config.json +1 -1
- package/example/config.xml +7 -0
- package/example/package.json +1 -1
- package/example/www/css/index.css +59 -109
- package/example/www/index.html +38 -39
- package/example/www/js/bannerAd.js +7 -62
- package/example/www/js/deviceready.js +6 -6
- package/example/www/js/interstitialAd.js +0 -2
- package/example/www/js/optionalFirebaseAnalytics.js +0 -2
- package/example/www/js/rewardedAd.js +0 -2
- package/package.json +1 -1
- package/plugin.xml +7 -9
- package/src/android/emiAdmobPlugin.kt +438 -256
- package/src/ios/emiAdmobPlugin.m +280 -184
- package/www/emiAdmobPlugin.js +3 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
//
|
1
|
+
// cordova.plugins.emiAdmobPlugin.styleBannerAd({isOverlapping: true, overlappingHeight: 0, padding: 0, margins: 0 }); // ( only android)
|
2
2
|
//cordova.plugins.emiAdmobPlugin.loadBannerAd({config});
|
3
3
|
//cordova.plugins.emiAdmobPlugin.showBannerAd(); // default
|
4
4
|
//cordova.plugins.emiAdmobPlugin.hideBannerAd(); // default
|
@@ -8,45 +8,27 @@
|
|
8
8
|
|
9
9
|
function loadBanner() {
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
// IOS Still under development
|
11
|
+
// Optional Only IOS
|
14
12
|
if (isPlatformIOS){
|
15
|
-
// If there is a problem isOverlapping: false
|
16
13
|
cordova.plugins.emiAdmobPlugin.styleBannerAd({
|
17
14
|
isOverlapping: true, // default false IOS | Android
|
18
15
|
paddingWebView: 1.0 // Only IOS
|
19
16
|
});
|
20
17
|
|
21
|
-
} else {
|
22
|
-
|
23
|
-
// Android
|
24
|
-
|
25
|
-
cordova.plugins.emiAdmobPlugin.styleBannerAd({
|
26
|
-
isOverlapping: true, // default false IOS | Android
|
27
|
-
isStatusBarShow: true, // default true Only Android
|
28
|
-
overlappingHeight: 0, // default 0 (Automatic) Only Android
|
29
|
-
padding: 0, // default 0 Only Android
|
30
|
-
margins: 0 // default 0 (Automatic) Only Android
|
31
|
-
});
|
32
|
-
|
33
|
-
|
34
18
|
}
|
35
19
|
|
36
20
|
|
37
21
|
|
38
|
-
|
39
|
-
|
40
22
|
cordova.plugins.emiAdmobPlugin.loadBannerAd({
|
41
23
|
adUnitId: Banner_ID, //Banner_ID,
|
42
24
|
position: "bottom-center", // "Recommended: bottom-center"
|
43
|
-
size: "banner",
|
44
|
-
collapsible: "
|
45
|
-
autoResize: true, // default false
|
25
|
+
size: "banner",
|
26
|
+
collapsible: "", // position: top | bottom (disable, empty string)
|
46
27
|
autoShow: true, // default false
|
47
|
-
|
28
|
+
isOverlapping: false // The height of the body is reduced by the height of the banner.
|
29
|
+
// isOverlapping: true // The body height is not reduced, the banner overlaps on top of the body
|
48
30
|
});
|
49
|
-
|
31
|
+
|
50
32
|
|
51
33
|
}
|
52
34
|
|
@@ -80,18 +62,6 @@ function removeBanner() {
|
|
80
62
|
|
81
63
|
/* ///////<<<< bannerAd position >>>>>>\\\\\\\
|
82
64
|
|
83
|
-
(ANDROID)
|
84
|
-
|
85
|
-
top-right
|
86
|
-
top-center
|
87
|
-
left
|
88
|
-
center
|
89
|
-
right
|
90
|
-
bottom-center
|
91
|
-
bottom-right
|
92
|
-
|
93
|
-
(IOS)
|
94
|
-
|
95
65
|
bottom-center
|
96
66
|
top-center
|
97
67
|
|
@@ -141,8 +111,6 @@ on.banner.revenue
|
|
141
111
|
on.banner.remove
|
142
112
|
on.banner.hide
|
143
113
|
|
144
|
-
// New event plugin v1.5.5 or higher
|
145
|
-
|
146
114
|
on.is.collapsible
|
147
115
|
on.bannerAd.responseInfo
|
148
116
|
|
@@ -151,29 +119,6 @@ on.banner.hide
|
|
151
119
|
|
152
120
|
|
153
121
|
|
154
|
-
// EVENT For example
|
155
|
-
|
156
|
-
|
157
|
-
// (Optional)
|
158
|
-
// This is only triggered when cordova.plugins.emiAdmobPlugin.styleBannerAd
|
159
|
-
document.addEventListener('on.style.banner.ad', (data) => {
|
160
|
-
console.log("on.style.banner.ad: " + JSON.stringify(data));
|
161
|
-
/*
|
162
|
-
const navBarHeight = data.navBarHeight;
|
163
|
-
const screenHeight = data.screenHeight;
|
164
|
-
const usableHeight = data.usableHeight;
|
165
|
-
const isOverlapping = data.isOverlapping;
|
166
|
-
const overlappingHeight = data.overlappingHeight;
|
167
|
-
const paddingInPx = data.paddingInPx;
|
168
|
-
const marginsInPx = data.marginsInPx;
|
169
|
-
*/
|
170
|
-
|
171
|
-
// You can load banner ads here, or manipulate variables, even rearrange cordova.plugins.emiAdmobPlugin.styleBannerAd to your liking.
|
172
|
-
|
173
|
-
|
174
|
-
});
|
175
|
-
|
176
|
-
|
177
122
|
|
178
123
|
|
179
124
|
|
@@ -67,7 +67,7 @@ document.addEventListener("deviceready", function () {
|
|
67
67
|
|
68
68
|
|
69
69
|
|
70
|
-
// globalSettings
|
70
|
+
// globalSettings Optional
|
71
71
|
cordova.plugins.emiAdmobPlugin.globalSettings({
|
72
72
|
setAppMuted: false, // Type Boolean default: false
|
73
73
|
setAppVolume: 1.0, // Type float
|
@@ -77,7 +77,7 @@ document.addEventListener("deviceready", function () {
|
|
77
77
|
|
78
78
|
|
79
79
|
if (isPlatformIOS){
|
80
|
-
|
80
|
+
// with callback: https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/issues/57
|
81
81
|
cordova.plugins.emiAdmobPlugin.requestIDFA(); // requestTrackingAuthorization
|
82
82
|
|
83
83
|
}
|
@@ -100,8 +100,8 @@ document.addEventListener("deviceready", function () {
|
|
100
100
|
cordova.plugins.emiAdmobPlugin.initialize({
|
101
101
|
|
102
102
|
isUsingAdManagerRequest: true, // true = AdManager | false = AdMob (Default true)
|
103
|
-
isResponseInfo:
|
104
|
-
isConsentDebug:
|
103
|
+
isResponseInfo: false, // debug true | Production false
|
104
|
+
isConsentDebug: false, // debug true | Production false
|
105
105
|
|
106
106
|
});
|
107
107
|
|
@@ -112,8 +112,8 @@ document.addEventListener("deviceready", function () {
|
|
112
112
|
// JSON.stringify(data)
|
113
113
|
const sdkVersion = data.version;
|
114
114
|
// const adAdapter = data.adapters;
|
115
|
-
const conStatus = data.consentStatus;
|
116
|
-
const attStatus = data.attStatus;
|
115
|
+
const conStatus = data.consentStatus; // UMP
|
116
|
+
const attStatus = data.attStatus; // ATT
|
117
117
|
// const gdprApplie = data.gdprApplies;
|
118
118
|
// const purposeConsent = data.purposeConsents;
|
119
119
|
// const vendorConsents = data.vendorConsents;
|
package/package.json
CHANGED
package/plugin.xml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
2
2
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
3
|
-
id="emi-indo-cordova-plugin-admob" version="2.0.
|
3
|
+
id="emi-indo-cordova-plugin-admob" version="2.0.7">
|
4
4
|
|
5
5
|
<name>emiAdmobPlugin</name>
|
6
6
|
<description>Cordova/Quasar/Capacitor Plugin Admob Android IOS</description>
|
@@ -18,7 +18,6 @@
|
|
18
18
|
version=">=11.0.0" />
|
19
19
|
<engine name="cordova-ios"
|
20
20
|
version=">=5.0.0" />
|
21
|
-
|
22
21
|
</engines>
|
23
22
|
|
24
23
|
|
@@ -33,12 +32,11 @@
|
|
33
32
|
<config-file parent="/*" target="config.xml">
|
34
33
|
<preference name="AndroidXEnabled" value="true" />
|
35
34
|
<preference name="GradlePluginKotlinEnabled" value="true" />
|
36
|
-
<preference name="GradlePluginKotlinVersion" value="1.
|
35
|
+
<preference name="GradlePluginKotlinVersion" value="2.1.0" />
|
37
36
|
</config-file>
|
38
37
|
|
39
38
|
<config-file parent="/*" target="AndroidManifest.xml">
|
40
39
|
<uses-permission android:name="android.permission.INTERNET" />
|
41
|
-
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
42
40
|
</config-file>
|
43
41
|
|
44
42
|
<config-file target="AndroidManifest.xml" parent="/manifest/application">
|
@@ -61,11 +59,11 @@
|
|
61
59
|
<!-- Sample AdMob app ID: ca-app-pub-3940256099942544~3347511713 -->
|
62
60
|
|
63
61
|
<preference name="APP_ID_ANDROID" default="ca-app-pub-3940256099942544~3347511713" />
|
64
|
-
<preference name="PLAY_SERVICES_VERSION" default="
|
62
|
+
<preference name="PLAY_SERVICES_VERSION" default="24.1.0" />
|
65
63
|
|
66
64
|
<framework src="com.google.android.gms:play-services-ads:$PLAY_SERVICES_VERSION" />
|
67
65
|
|
68
|
-
<preference name="UMP" default="3.
|
66
|
+
<preference name="UMP" default="3.2.0" />
|
69
67
|
<framework src="com.google.android.ump:user-messaging-platform:$UMP" />
|
70
68
|
|
71
69
|
<!-- Dependency Consent status will automatically reset after 12 months -->
|
@@ -302,9 +300,9 @@
|
|
302
300
|
<source url="https://cdn.cocoapods.org/" />
|
303
301
|
</config>
|
304
302
|
<pods use-frameworks="true">
|
305
|
-
<!--minimum macOS 14.4 > Xcode
|
306
|
-
<pod name="GoogleUserMessagingPlatform" spec="~>
|
307
|
-
<pod name="Google-Mobile-Ads-SDK" spec="~>
|
303
|
+
<!--minimum macOS 14.4 > Xcode 16.0 -->
|
304
|
+
<pod name="GoogleUserMessagingPlatform" spec="~> 3.0.0" />
|
305
|
+
<pod name="Google-Mobile-Ads-SDK" spec="~> 12.2.0" />
|
308
306
|
|
309
307
|
</pods>
|
310
308
|
</podspec>
|