1.4.8 • Published 3 months ago

emi-indo-cordova-plugin-admob v1.4.8

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

emi-indo-cordova-plugin-admob

Cordova Plugin Admob Android and IOS

Mobile Ads SDK (Android: 22.6.0) Release Notes:

Mobile Ads SDK (IOS: 10.14.0) Release Notes:

Minimum Cordova Engines

  • cordova-android version = 12.0.0
  • cordova-ios version = 7.0.0

Minimum macOS | Xcode, and others

Note

  • It's Not a fork, it's purely rewritten, clean of 3rd party code.

Note

  • No Ad-Sharing

  • No Remote Control

  • I guarantee 100% revenue for you.

  • Code source: - Admob:

VIDEO Test Collapsible banner ads

  • Test Plugin with construct 3

Video

VIDEO Test UMP or CMP SDK Android

  • Test Plugin with construct 3

Video

VIDEO Test UMP or CMP SDK IOS

  • Test Plugin with construct 3

Video

VIDEO Test Ad Type with Xcode/IOS

  • Test Plugin with construct 3

Video

💰Sponsor this project

PayPal

Check all release notes:

Features

Installation

cordova plugin add emi-indo-cordova-plugin-admob  --save --variable APP_ID_ANDROID=ca-app-pub-xxx~xxx --variable APP_ID_IOS=ca-app-pub-xxx~xxx

Or

cordova plugin add https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob  --save --variable APP_ID_ANDROID=ca-app-pub-xxx~xxx --variable APP_ID_IOS=ca-app-pub-xxx~xxx

Remove

cordova plugin rm emi-indo-cordova-plugin-admob

Import the Mobile Ads SDK IOS

Then from the command line run:

  • cd platforms/ios

Then from the command line run:

  • pod install --repo-update

>>> Device Ready <<<

must be false if the application is released to the play store / app store. consent from will continue to be called regardless of its status 0,1,2,3, until the value is changed to false.

setDebugGeography = true | false

document.addEventListener("deviceready", function(){

const config_globalSettings = [

setAppMuted = false, //  default: false
setAppVolume = 1, //  float: default: 1
enableSameAppKey = false, // default: false
npa = "1", // string "0" | "1"
enableCollapsible = true, // (BETA) activate the collapsible banner ads
responseInfo = false, // default: false
setDebugGeography = false // default: false

]

cordova.plugins.emiAdmobPlugin.getConsentRequest( (ststus) => { console.log("Consent Status: " + ststus) }); cordova.plugins.emiAdmobPlugin.globalSettings(config_globalSettings);

document.addEventListener('on.get.consent.status', () => { // Regardless of the state, call SDK initialize

cordova.plugins.emiAdmobPlugin.initialize(); cordova.plugins.emiAdmobPlugin.getIabTfc((IABTFC) => { console.log(JSONstringify(IABTFC)) }); });

}, false);

console.log("on get consent status");

});

console.log("on TCString expires 360 days"); cordova.plugins.emiAdmobPlugin.consentReset();

});

Global Variable adunitId

<script>
Ad format	Demo ad unit ID
// https://developers.google.com/admob/android/test-ads
// https://developers.google.com/admob/ios/test-ads

var App_Open_ID;
var Banner_ID;
var Interstitial_ID;
var Rewarded_ID;
var Rewarded_Interstitial_ID;

if (window.cordova.platformId === 'ios') {
   
    App_Open_ID = 'ca-app-pub-3940256099942544/5575463023';
    Banner_ID = 'ca-app-pub-3940256099942544/2934735716';
    Interstitial_ID = 'ca-app-pub-3940256099942544/4411468910';
    Rewarded_ID = 'ca-app-pub-3940256099942544/1712485313';
    Rewarded_Interstitial_ID = 'ca-app-pub-3940256099942544/6978759866';
    
} else {
    // Assume Android
    App_Open_ID = 'ca-app-pub-3940256099942544/9257395921';
    Banner_ID = 'ca-app-pub-3940256099942544/6300978111';
    Interstitial_ID = 'ca-app-pub-3940256099942544/1033173712';
    Rewarded_ID = 'ca-app-pub-3940256099942544/5224354917';
    Rewarded_Interstitial_ID = 'ca-app-pub-3940256099942544/5354046379';
}
 </script>

AppOpenAd ADS

// WARNING config must be an array[] not an object{} // adUnitId = call Global Variable

cordova.plugins.emiAdmobPlugin.loadAppOpenAd( adUnitId = App_Open_ID, autoShow = true );

console.log("On App Open Ad loaded");

});

BANNER ADS

const bannerConfig = [

adUnitId = Banner_ID, position = "bottom-center", size = "BANNER", collapsible = "bottom", // (BETA) enable in globalSettings adaptive_Width = 320, // Ignored autoShow = true // boolean

]

cordova.plugins.emiAdmobPlugin.loadBannerAd(bannerConfig);

console.log("on banner load");

});

FULL Banner basic: index.html

Interstitial ADS

// WARNING config must be an array[] not an object{} // adUnitId = call Global Variable

cordova.plugins.emiAdmobPlugin.loadInterstitialAd( adUnitId = Interstitial_ID, autoShow = true );

console.log("on interstitial Ad loaded");

});

FULL Interstitial basic: index.html

Rewarded Interstitial ADS

// WARNING config must be an array[] not an object{} // adUnitId = call Global Variable

cordova.plugins.emiAdmobPlugin.loadRewardedInterstitialAd( adUnitId = Rewarded_Interstitial_ID, autoShow = true );

console.log("on rewarded Interstitial load");

});

FULL Rewarded Interstitial basic: index.html

Rewarded ADS

cordova.plugins.emiAdmobPlugin.loadRewardedAd( adUnitId = Rewarded_ID, autoShow = true );

console.log("on rewarded Ad loaded");

});

FULL Rewarded basic: index.html

Features

IAB Europe Transparency & Consent Framework

         cordova.plugins.emiAdmobPlugin.getIabTfc(
            (info) => {
                // How to read consent choices
                console.log("IABTCF_gdprApplies: " + info.IABTCF_gdprApplies);
                console.log("IABTCF_PurposeConsents: " + info.IABTCF_PurposeConsents);
                console.log("IABTCF_TCString: " + info.IABTCF_TCString);

                                    // A small example
                                    var fundingChoices;
                
                                    fundingChoices = info.IABTCF_PurposeConsents;
                                   if (fundingChoices === "1111111111"){
                                       
                                   // Enable app features.
                                    loadRewardedAd();
                                    
                                   } else if (fundingChoices === "") {
                
                                       // disable app features.
                
                                   } else {
                
                                      // You have to test everything yourself.
                                      console.log(info);
                
                                   }
               
            },
            (error) => {
                 console.log("Error: " + error);
                
            });

    
</details>



# Admob Mediation

<details>
<summary>Mediation #9</summary>



<img src="https://user-images.githubusercontent.com/78555833/229587307-91a7e380-aa2d-4140-a62d-fa8e6a8dd153.png" width="500">


## get Mediation Adapter Name

responseInfo = true // (debugging)

<img src="https://user-images.githubusercontent.com/78555833/230655800-0dbc3f12-72fb-4cf3-b4e6-801704fade28.png" width="250">



## Meta Audience Network

[Integrate Meta Audience Network with bidding :](https://developers.google.com/admob/android/mediation/meta)
- (Adapter default: 6.13.7.0)
### Installation
```bash
cordova plugin add emi-indo-cordova-plugin-mediation-meta
  • ================================

Unity Ads

Integrate Unity Ads with Mediation :

  • (Adapter default: 4.6.1.0)

Installation

cordova plugin add emi-indo-cordova-plugin-mediation-unity
  • ================================

AppLovin Ads

Integrate AppLovin with Mediation :

  • (Adapter default: 11.8.2.0)

Installation

cordova plugin add emi-indo-cordova-plugin-mediation-applovin
  • ================================

AdColony Ads

Integrate AdColony with Mediation :

  • (Adapter default: 4.8.0.1)

Installation

cordova plugin add emi-indo-cordova-plugin-mediation-adcolony
  • ================================

Chartboost Ads

Integrate Chartboost with Mediation :

  • (Adapter default: 9.2.1.0)

Installation

cordova plugin add emi-indo-cordova-plugin-mediation-chartboost
  • ================================

ironSource Ads

Integrate ironSource with Mediation :

  • (Adapter default: 7.2.7.0)

Installation

cordova plugin add emi-indo-cordova-plugin-mediation-ironsource

Variables name or preference name

Warning This is so that if I don't have time to update the Mediation Adapter version later, you can do it yourself as below.

  • Cordova CLI Update Adapter version with Variables
cordova plugin add emi-indo-cordova-plugin-mediation-meta --variable META_ADAPTER_VERSION="xxxxx"
  • Update Adapter version with config.xml
<preference name="META_ADAPTER_VERSION" value="xxxxx" />

Variables Name

  • --variable META_ADAPTER_VERSION="xxxxx"
  • --variable UNITY_ADAPTER_VERSION="xxxxx"
  • --variable APPLOVIN_ADAPTER_VERSION="xxxxx"
  • --variable ADCOLONY_ADAPTER_VERSION="xxxxx"
  • --variable CHARTBOOST_ADAPTER_VERSION="xxxxx"
  • --variable IRONSOURCE_ADAPTER_VERSION="xxxxx"

preference name

  • META_ADAPTER_VERSION
  • UNITY_ADAPTER_VERSION
  • APPLOVIN_ADAPTER_VERSION
  • ADCOLONY_ADAPTER_VERSION
  • CHARTBOOST_ADAPTER_VERSION
  • IRONSOURCE_ADAPTER_VERSION

  • ================================

💰Sponsor this project

PayPal

Earn more money, with other ad networks.

1.4.8

3 months ago

1.4.7

3 months ago

1.4.6

4 months ago

1.4.5

5 months ago

1.4.4

5 months ago

1.4.3

5 months ago

1.4.2

5 months ago

1.4.1

5 months ago

1.4.0

6 months ago

1.3.9

8 months ago

1.1.9

10 months ago

1.2.9

10 months ago

1.0.9

12 months ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago