emi-indo-cordova-plugin-admob 1.4.2 → 1.4.3

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.
@@ -1,24 +1,16 @@
1
1
  var exec = require('cordova/exec');
2
+
2
3
  exports.initialize = function (success, error) {
3
4
  exec(success, error, 'emiAdmobPlugin', 'initialize', []);
4
5
  };
5
- exports.getIabTfc = function (success, error) {
6
- exec(success, error, 'emiAdmobPlugin', 'getIabTfc', []);
7
- };
8
- exports.showPrivacyOptionsForm = function (success, error) {
9
- exec(success, error, 'emiAdmobPlugin', 'showPrivacyOptionsForm', []);
10
- };
11
6
  exports.loadAppOpenAd = function (arg0, arg1, success, error) {
12
- exec(success, error, 'emiAdmobPlugin', 'loadAppOpenAd', [arg0, arg1]);
7
+ exec(success, error, 'emiAdmobPlugin', 'loadAppOpenAd', arg0, arg1);
13
8
  };
14
9
  exports.showAppOpenAd = function (success, error) {
15
10
  exec(success, error, 'emiAdmobPlugin', 'showAppOpenAd', []);
16
11
  };
17
12
  exports.loadBannerAd = function (arg0, arg1, arg2, arg3, arg4, arg5, success, error) {
18
- exec(success, error, 'emiAdmobPlugin', 'loadBannerAd', [arg0, arg1, arg2, arg3, arg4, arg5]);
19
- };
20
- exports.requestIDFA = function (success, error) {
21
- exec(success, error, 'emiAdmobPlugin', 'requestIDFA', []);
13
+ exec(success, error, 'emiAdmobPlugin', 'loadBannerAd', arg0, arg1, arg2, arg3, arg4, arg5);
22
14
  };
23
15
  exports.showBannerAd = function (success, error) {
24
16
  exec(success, error, 'emiAdmobPlugin', 'showBannerAd', []);
@@ -30,23 +22,26 @@ exports.removeBannerAd = function (arg0, success, error) {
30
22
  exec(success, error, 'emiAdmobPlugin', 'removeBannerAd', [arg0]);
31
23
  };
32
24
  exports.loadInterstitialAd = function (arg0, arg1, success, error) {
33
- exec(success, error, 'emiAdmobPlugin', 'loadInterstitialAd', [arg0, arg1]);
25
+ exec(success, error, 'emiAdmobPlugin', 'loadInterstitialAd', arg0, arg1);
34
26
  };
35
27
  exports.showInterstitialAd = function (success, error) {
36
28
  exec(success, error, 'emiAdmobPlugin', 'showInterstitialAd', []);
37
29
  };
38
30
  exports.loadRewardedAd = function (arg0, arg1, success, error) {
39
- exec(success, error, 'emiAdmobPlugin', 'loadRewardedAd', [arg0, arg1]);
31
+ exec(success, error, 'emiAdmobPlugin', 'loadRewardedAd', arg0, arg1);
40
32
  };
41
33
  exports.showRewardedAd = function (success, error) {
42
34
  exec(success, error, 'emiAdmobPlugin', 'showRewardedAd', []);
43
35
  };
44
36
  exports.loadRewardedInterstitialAd = function (arg0, arg1, success, error) {
45
- exec(success, error, 'emiAdmobPlugin', 'loadRewardedInterstitialAd', [arg0, arg1]);
37
+ exec(success, error, 'emiAdmobPlugin', 'loadRewardedInterstitialAd', arg0, arg1);
46
38
  };
47
39
  exports.showRewardedInterstitialAd = function (success, error) {
48
40
  exec(success, error, 'emiAdmobPlugin', 'showRewardedInterstitialAd', []);
49
41
  };
42
+ exports.requestIDFA = function (success, error) {
43
+ exec(success, error, 'emiAdmobPlugin', 'requestIDFA', []);
44
+ };
50
45
  exports.getConsentRequest = function (success, error) {
51
46
  exec(success, error, 'emiAdmobPlugin', 'getConsentRequest', []);
52
47
  };
@@ -54,8 +49,15 @@ exports.consentReset = function (success, error) {
54
49
  exec(success, error, 'emiAdmobPlugin', 'consentReset', []);
55
50
  };
56
51
  exports.targeting = function (arg0, arg1, arg2, success, error) {
57
- exec(success, error, 'emiAdmobPlugin', 'targeting', [arg0, arg1, arg2]);
52
+ exec(success, error, 'emiAdmobPlugin', 'targeting', arg0, arg1, arg2);
53
+ };
54
+ exports.getIabTfc = function (success, error) {
55
+ exec(success, error, 'emiAdmobPlugin', 'getIabTfc', []);
56
+ };
57
+ exports.showPrivacyOptionsForm = function (success, error) {
58
+ exec(success, error, 'emiAdmobPlugin', 'showPrivacyOptionsForm', []);
59
+ };
60
+ exports.globalSettings = function (arg0, arg1, arg2, arg3, arg4, arg5, success, error) {
61
+ exec(success, error, 'emiAdmobPlugin', 'globalSettings', arg0, arg1, arg2, arg3, arg4, arg5);
58
62
  };
59
- exports.globalSettings = function (arg0, arg1, arg2, arg3, arg4, success, error) {
60
- exec(success, error, 'emiAdmobPlugin', 'globalSettings', [arg0, arg1, arg2, arg3, arg4]);
61
- };
63
+
@@ -1,94 +0,0 @@
1
- <html>
2
- <head>
3
- <script type="text/javascript" src="cordova.js"></script>
4
- </head>
5
- <body>
6
-
7
- <script>
8
-
9
-
10
- // For example automatically load Interstitial Ad
11
-
12
- // Load Interstitial Ad
13
-
14
- let loadInterstitialAd = () => {
15
- cordova.plugins.emiAdmobPlugin.loadInterstitialAd(
16
- AdUnitId = "ca-app-pub-3940256099942544/1033173712",
17
- npa = "1", // String | 0 | 1
18
- responseInfo = true, // boolean
19
-
20
- // Optional
21
- (info) => { alert(info) },
22
- (error) => { alert(error)
23
-
24
- });
25
-
26
- // call loadInterstitialAd();
27
- }
28
-
29
- // Show Interstitial Ad
30
-
31
- let showInterstitialAd = () => {
32
- cordova.plugins.emiAdmobPlugin.showInterstitialAd();
33
-
34
- // call showInterstitialAd();
35
- }
36
-
37
-
38
-
39
-
40
- // deviceready
41
-
42
- document.addEventListener("deviceready", function(){
43
-
44
- // Before loading ads, have your app initialize the Google Mobile Ads SDK by calling
45
- // This needs to be done only once, ideally at app launch.
46
-
47
- cordova.plugins.emiAdmobPlugin.initialize();
48
-
49
-
50
- // auto load call loadInterstitialAd();
51
-
52
- loadInterstitialAd();
53
-
54
-
55
-
56
-
57
- // Interstitial EVENT
58
-
59
- /*
60
- on.interstitial.loaded
61
- on.interstitial.failed.load
62
- on.interstitial.click
63
- on.interstitial.dismissed
64
- on.interstitial.failed.show
65
- on.interstitial.impression
66
- on.interstitial.show
67
- on.interstitial.revenue
68
- */
69
-
70
- document.addEventListener('on.interstitial.loaded', () => {
71
-
72
- // auto show call showInterstitialAd();
73
-
74
- showInterstitialAd();
75
-
76
- console.log("on Interstitial Ad Loaded");
77
-
78
- });
79
-
80
-
81
-
82
-
83
- }, false);
84
-
85
- </script>
86
-
87
-
88
- <p> <button onclick="loadInterstitialAd();">Load Interstitial Ad</button></p>
89
- <p> <button onclick="showInterstitialAd();">Show Interstitial Ad</button></p>
90
-
91
-
92
-
93
- </body>
94
- </html>