Releases: EMI-INDO/emi-indo-cordova-plugin-admob
emi-indo-cordova-plugin-admob@1.5.6
Admob Mediation (supports both platforms)
-
commit 8453619
-
--variable META_ADAPTER_VERSION="xxxxx" --variable IOS_META_ADAPTER_VERSION="xxxxx"
-
--variable UNITY_ADAPTER_VERSION="xxxxx" --variable IOS_UNITY_ADAPTER_VERSION="xxxxx"
-
--variable APPLOVIN_ADAPTER_VERSION="xxxxx" --variable IOS_APPLOVIN_ADAPTER_VERSION="xxxxx"
-
--variable ADCOLONY_ADAPTER_VERSION="xxxxx" --variable IOS_ADCOLONY_ADAPTER_VERSION="xxxxx"
-
--variable CHARTBOOST_ADAPTER_VERSION="xxxxx" --variable IOS_CHARTBOOST_ADAPTER_VERSION="xxxxx"
-
--variable IRONSOURCE_ADAPTER_VERSION="xxxxx" --variable IOS_IRONSOURCE_ADAPTER_VERSION="xxxxx"
preference name
(ANDROID)
- META_ADAPTER_VERSION
- UNITY_ADAPTER_VERSION
- APPLOVIN_ADAPTER_VERSION
- ADCOLONY_ADAPTER_VERSION
- CHARTBOOST_ADAPTER_VERSION
- IRONSOURCE_ADAPTER_VERSION
(IOS)
- IOS_META_ADAPTER_VERSION
- IOS_UNITY_ADAPTER_VERSION
- IOS_APPLOVIN_ADAPTER_VERSION
- IOS_ADCOLONY_ADAPTER_VERSION
- IOS_CHARTBOOST_ADAPTER_VERSION
- IOS_IRONSOURCE_ADAPTER_VERSION
emi-indo-cordova-plugin-admob@1.5.5
Only IOS
commit - 80be44e
- only github, new paidEventHandler, responseInfo
https://developers.google.com/admob/ios/impression-level-ad-revenue?hl=en
https://developers.google.com/admob/ios/response-info?hl=en
only github
Only IOS 69ac227
Installation
cordova plugin add https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob --save --variable APP_ID_IOS=ca-app-pub-xxx~xxx
NOTE release
- Adding new examples https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/tree/main/Example/www
- send data to 3 event including appOpen, interstitial, rewarded, rewarded Interstitial
// examples interstitial, including appOpen, rewarded, rewarded Interstitial
document.addEventListener('on.interstitial.failed.load', (error) => {
console.log("on.interstitial.failed.load" + JSON.stringify(error));
});
document.addEventListener('on.interstitial.failed.show', (error) => {
console.log("on.interstitial.failed.show" + JSON.stringify(error));
});
// examples reward, including rewarded Interstitial
document.addEventListener('on.reward.userEarnedReward', (rewarded) => {
// Give gifts to users here
console.log("Give gifts to users here" + JSON.stringify(rewarded));
// const rewardAmount = rewarded.amount;
// const rewardType = rewarded.currency;
});
- And other minor repairs
emi-indo-cordova-plugin-admob@1.5.3
-
only android
-
switch RelativeLayout banner to FrameLayout
Ad Size and Position Adjustment: In the adjustWebViewForBanner() function, the padding for the WebView is adjusted based on the ad position so that the ad does not overlap with the content.
-
Update README
Fix the documentation that was originally Advanced, show to Advanced load
emi-indo-cordova-plugin-admob@1.5.2
Only IOS
- Support Ad IOS 18.0 *
- emi-indo-cordova-plugin-admob@1.5.2
- Minimum supported Xcode version up to 15.3 or higher
- minimum deployment-target: 12.2
Minimum macOS | Xcode, and others
-
minimum macOS 14.4 or higher
-
Xcode min 15.3 > or higher
-
Command Line Tools 15.3 or higher
-
minimum SwiftVersion: 5.10 or higher
-
Dependency: pod MerchantKit (not needed)
-
Update SDK
Mobile Ads SDK (IOS: 11.10.0) Release Notes:
User Messaging Platform (UMP IOS: 2.6.0) Release Notes:
Note
- To prevent some warnings or errors in xcode later, it is best after adding platforms and plugins cd/project root/command line run cordova prepare.
- after that just cd platform/ios command line run pod install --repo-update
emi-indo-cordova-plugin-admob@1.5.1
Update for IOS Only
- commit a54f487
emi-indo-cordova-plugin-admob@1.5.1
-
Collapsible banner autoResize https://www.youtube.com/watch?v=sLXHKdU6DAg
-
README updated
Warning
- Minimum supported Xcode version to 14.3
- Maximum supported Xcode version up to 15.2
SKAdNetworkIdentifier Deprecated
Update plugin.xml https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/plugin.xml
- commit a54f487
- Release SKAdNetwork https://developers.google.com/admob/ios/3p-skadnetworks
- 4pfyvq9l8r.skadnetwork Deprecated
- 5a6flpkh64.skadnetwork Deprecated
- f38h382jlk.skadnetwork update to hs6bdukanm.skadnetwork
- hs6bdukanm.skadnetwork update to mlmmfzh3r3.skadnetwork
- n6fk4nfna4.skadnetwork Deprecated
- eh6m2bh4zr.skadnetwork Deprecated
- klf5c3l5u5.skadnetwork Deprecated
- ecpz2srf59.skadnetwork Deprecated
- mlmmfzh3r3.skadnetwork Deprecated
- e5fvkxwrpn.skadnetwork update to tl55sbb4fm.skadnetwork
- 8c4e2ghe7u.skadnetwork update to e5fvkxwrpn.skadnetwork
- zq492l623r.skadnetwork update to 8c4e2ghe7u.skadnetwork
deployment-target or SwiftVersion No longer needed in config.xml already added to plugin.xml
Update plugin.xml https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/plugin.xml
- commit a54f487
- preference name="deployment-target" value="12.0" auto
- preference name="SwiftVersion" value="5.3" auto
New Method (Only IOS)
- You will see higher earnings.
Note
- Is forcing the consent form to be displayed against admob policy? (I DON'T KNOW)
Method:
/*
Sometimes the consent form in IOS is difficult to display,
because ATT has been set by the user,
The problem is TCString null,
causing very few admob ads to load,
This method will force the consent form to be displayed, whatever the user's decision TCString will not be null.*/
// Use your own logic, this is just an example let userGdpr = null; // global Variable let userTCString = null; // global Variable document.addEventListener('on.sdkInitialization', (data) => { userGdpr = data.gdprApplies; userTCString = data.consentTCString; }); if (userGdpr === 1 && userTCString === null){ cordova.plugins.emiAdmobPlugin.forceDisplayPrivacyForm(); }
Note
- Same api as v1.5.0 android release: https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/releases/tag/%401.4.9
Does not include methods
- Advanced Show
- cordova.plugins.emiAdmobPlugin.styleBannerAd({padding: 50, margins: 50});
- cordova.plugins.emiAdmobPlugin.targetingAdRequest({configAdRequest});
- cordova.plugins.emiAdmobPlugin.setPersonalizationState({config});
- cordova.plugins.emiAdmobPlugin.setPPS({config});
https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob@1.4.9
Switch language to kotlin
- Covers all new api v1.4.9 (Android only)
- README updated
SDK Update
- Mobile Ads SDK (Android: 23.4.0)
- Mobile Ads SDK (IOS: 11.5.0) > Old Api v1.4.8
- UMP 3.0.0
initialize({config})
- Kotlin Logic Consent Form -> success consentInformation.canRequestAds(), error consentInformation.canRequestAds()
https://developers.google.com/admob/android/privacy
Example
cordova.plugins.emiAdmobPlugin.initialize({ isUsingAdManagerRequest: true, // true = AdManagerAdRequest.Builder | false = AdRequest.Builder (Default true) isResponseInfo: true, // Default false (Debug true) isConsentDebug: true, // Default false (Debug true) }); // (Optional) document.addEventListener('on.sdkInitialization', (data) => { // JSON.stringify(data) const sdkVersion = data.version; // const adAdapter = data.adapters; // const conStatus = data.consentStatus; // const gdprApplie = data.gdprApplies; // const purposeConsent = data.purposeConsents; // const vendorConsents = data.vendorConsents; // const conTCString = data.consentTCString; // const additionalConsent = data.additionalConsent; console.log("On Sdk Initialization version: " + sdkVersion); });
array to object
Warning
WARNING options configuration was previously an array [],
New v.1.4.9 or later must be an object{}
Example
[ adUnitId = App_Open_ID, autoShow = true ] // Deprecated New { adUnitId: App_Open_ID, autoShow: true } cordova.plugins.emiAdmobPlugin.loadAppOpenAd({ adUnitId: App_Open_ID, autoShow: true });
Most affected (Banner Ad)
Banner Ad Config
const bannerConfig = { adUnitId: "ca-app-pub-3940256099942544/9214589741", //Banner_ID, position: "bottom-center", size: "responsive_adaptive", // autoResize: true (only responsive_adaptive) collapsible: "bottom", // position: top | bottom (disable, empty string) autoResize: true, // on.screen.rotated === orientation.portrait || on.screen.rotated === orientation.landscape autoShow: true, // boolean } cordova.plugins.emiAdmobPlugin.loadBannerAd(bannerConfig);
Banner Ad Size
responsive_adaptive
anchored_adaptive
full_width_adaptive
in_line_adaptive
banner
large_banner
medium_rectangle
full_banner
leaderboard
fluidANCHORED // Deprecated
IN_LINE // Deprecated
FULL_WIDTH // Deprecated
BANNER // Deprecated
FLUID // Deprecated
LARGE_BANNER // Deprecated
MEDIUM_RECTANGLE // Deprecated
FULL_BANNER // Deprecated
LEADERBOARD // Deprecated
adaptive_Width = number // Deprecated
New Banner Ad Method (Optional)
// Must be called before loadBannerAd(bannerConfig) // Example cordova.plugins.emiAdmobPlugin.styleBannerAd(padding: 50, margins: 50); // (Optional) cordova.plugins.emiAdmobPlugin.loadBannerAd(bannerConfig);
Advanced Show (Optional)
- Includes all method shows
Example Banner Ad
// showAppOpenAd() | showInterstitialAd() | showRewardedAd() | showRewardedInterstitialAd() cordova.plugins.emiAdmobPlugin.showBannerAd( (data) => { console.log("Micros: " + data.micros); console.log("Currency: " + data.currency); console.log("Precision: " + data.precision); console.log("AdUnitId: " + data.adUnitId}; }, (error) => { console.error("Error: " + error); });
GLOBAL EVENT Screen (Optional)
Event:
on.screen.rotated on.orientation.portrait on.orientation.landscape
New Method
Ad Request Control
Warning
isUsingAdManagerRequest: true
- cordova.plugins.emiAdmobPlugin.targetingAdRequest({configAdRequest});
- cordova.plugins.emiAdmobPlugin.setPersonalizationState({config});
- cordova.plugins.emiAdmobPlugin.setPPS({config});
targetingAdRequest
// Check documentation: https://developers.google.com/ad-manager/mobile-ads-sdk/android/targeting
const configAdRequest = { // enabled, disabled customTargetingEnabled: false, categoryExclusionsEnabled: false, ppIdEnabled: false, contentURLEnabled: false, brandSafetyEnabled: false, // set Value customTargetingValue: ["24", "25", "26"], // age categoryExclusionsValue: "automobile", // automobile or boat ppIdValue: "AB123456789", contentURLValue: "https://www.example.com", brandSafetyArr: ["https://www.mycontenturl1.com", "https://www.mycontenturl2.com"], } cordova.plugins.emiAdmobPlugin.targetingAdRequest(configAdRequest);
setPersonalizationState
// Check documentation: https://developers.google.com/ad-manager/mobile-ads-sdk/android/targeting
cordova.plugins.emiAdmobPlugin.setPersonalizationState({
setPersonalizationState: "disabled" // type string: disabled | enabled
});
setPPS
// Check documentation: https://developers.google.com/ad-manager/mobile-ads-sdk/android/targeting
cordova.plugins.emiAdmobPlugin.setPPS({ ppsEnabled: false, // enabled, disabled iabContent: "IAB_AUDIENCE_1_1", // Type string value: IAB_AUDIENCE_1_1 or IAB_CONTENT_2_2 ppsArrValue: [6,284], // type arr });
emi-indo-cordova-plugin-admob@1.4.1
big change release.
emi-indo-cordova-plugin-admob@1.4.1
Installation
- remove
cordova plugin rm emi-indo-cordova-plugin-admob
- add
cordova plugin add emi-indo-cordova-plugin-admob@1.4.1 --variable APP_ID_ANDROID=ca-app-pub-39402xxxxxxxx~xxxxxxxxxx
- (responseInfo) and (npa) variables moved to globalSettings, New (enableCollapsible) autoShow
Moving Variable
- npa
- responseInfo
New Variable
- enableCollapsible
- collapsible // https://developers.google.com/admob/android/banner/collapsible
- autoShow
Rename banner size
- Anchored_adaptive to ANCHORED
- Inline_adaptive to IN_LINE
New banner action
- hideBannerAd();
For example hideBannerAd
cordova.plugins.emiAdmobPlugin.hideBannerAd();
NotehideBannerAd();
can be re-displayed, without having to reload, whileremoveBannerAd();
must be reloaded to display it again.
NEW API
For example globalSettings
cordova.plugins.emiAdmobPlugin.globalSettings(
setAppMuted = false, // Type Boolean default: false
setAppVolume = 1, // Type float default: 1
enableSameAppKey = false, // Type Boolean default: false
npa = "1", // string "0" | "1"
enableCollapsible = true, // (BETA) activate the collapsible banner ads
responseInfo = true, // For debugging and logging purposes
// Optional
(info) => {
// event.value += (info)
},
(error) => {
});
For example Banner Ads
// index.html https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/banner_ads.html
let loadBannerAd = () => {
cordova.plugins.emiAdmobPlugin.loadBannerAd(
adUnitId = "ca-app-pub-3940256099942544/6300978111",
position = "bottom-center",
size = "ANCHORED",
collapsible = "bottom", // "bottom" | "top" (BETA) enable in globalSettings, enableCollapsible = true
// note move variable adaptiveWidth to adaptive_Width
adaptive_Width = 320, // Ignored
autoShow = false, // boolean
(info) => {
console.log( "\n ResponseInfo: " + JSON.stringify(info)); // responseInfo = true
},
(error) => {
console.log("\n Error: " + error)
});
}
// call loadBannerAd();
For example App Open or Interstitial or Rewarded or Rewarded interstitial
// now an example of App Open Ad, autoShow = true
let loadAppOpenAd = () => {
cordova.plugins.emiAdmobPlugin.loadAppOpenAd(
adUnitId = "ca-app-pub-3940256099942544/9257395921",
autoShow = true, // boolean
// responseInfo = true, moved to globalSettings
(info) => {
console.log( "\n ResponseInfo: " + JSON.stringify(info)); // responseInfo = true
},
(error) => {
console.log("\n Error: " + error)
});
}
// call loadAppOpenAd();
emi-indo-cordova-plugin-admob@1.1.9
Update Mobile Ads SDK (Android: 22.2.0)
https://developers.google.com/admob/android/rel-notes
All full examples
All event names updated
- neat short easy to read
on.sdkInitialization
on.appOpenAd.loaded
on.appOpenAd.failed.loaded
on.appOpenAd.dismissed
on.appOpenAd.failed.show
on.appOpenAd.show
on.appOpenAd.revenue // NEW
on.banner.load
on.banner.failed.load
on.banner.click
on.banner.close
on.banner.impression
on.banner.open
on.banner.revenue // NEW
on.banner.remove // NEW
on.interstitial.loaded
on.interstitial.failed.load
on.interstitial.click
on.interstitial.dismissed
on.interstitial.failed.show
on.interstitial.impression
on.interstitial.show
on.interstitial.revenue // NEW
on.rewarded.loaded
on.rewarded.failed.load
on.rewarded.click
on.rewarded.dismissed
on.rewarded.failed.show
on.rewarded.impression
on.rewarded.show
on.rewarded.revenue // NEW
on.rewarded.ad.skip // NEW
on.reward.userEarnedReward // NEW
on.rewardedInt.loaded
on.rewardedInt.failed.load
on.rewardedInt.click
on.rewardedInt.dismissed
on.rewardedInt.failed.show
on.rewardedInt.impression
on.rewardedInt.showed
on.rewardedInt.revenue // NEW
on.rewardedInt.ad.skip // NEW
on.rewardedInt.userEarnedReward // NEW
on.consent.info.update
on.consent.info.update.failed
on.consent.status.not_required
on.consent.status.obtained
on.consent.status.required
on.consent.status.unknown
on.consent.failed.show
on.consent.failed.load.from
on.consent.form.not.available