Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
cordova-plugin-ad-admob
Advanced tools
Show admob banner and full screen ad
[android, ios, wp8] [cordova cli] [xdk]
Requires admob account http://www.google.com/ads/admob/
[Admob mediation networks]
adcolony
http://www.adcolony.com/
facebookads
https://developers.facebook.com/docs/audience-network
flurryads
http://www.flurry.com/
huntmads
http://huntmads.com/google
iad
http://advertising.apple.com/
inmobi
http://www.inmobi.com/
leadbolt
http://leadbolt.net/
lifestreet
http://www.lifestreet.com/
millennialmedia
http://www.millennialmedia.com/
mobfox
http://www.mobfox.com/google/
mojiva
http://welcome.mojiva.com/
mopub
http://www.mopub.com/
phunware (tapit)
http://www.phunware.com/advertising
This is open source cordova plugin.
You can see Plugins For Cordova in one page: http://cranberrygame.github.io?referrer=github
2014.9.17
supports SKYSCRAPER size (120x600, Tablets, ipad only)
Added additional example (example/banner_position_size/index.html)
2014.9.18
supports isTest
supports other position: 'top-left', 'top-right', 'left', 'center', 'right', 'bottom-left', 'bottom-right' on android, wp8.
supports SMART_BANNER resize when orientation changes on android.
2014.9.20
supports isOverlap on android, ios, wp8
2014.9.24
supports banner ad callback (onBannerAdLoaded)
supports full screen ad callback (onFullScreenAdLoaded)
2014.10.3
supports banner ad callback (onBannerAdPreloaded)
supports full screen ad callback (onFullScreenAdPreloaded)
1.0.31
Updated Admob SDK
iOS 6.12.2
1.0.39
Moved package name from com.cranberrygame.phonegap.plugin.ad.admob to com.cranberrygame.cordova.plugin.ad.admob
Updated Admob SDK
android com.google.playservices@21.0.0
iOS GoogleMobileAdsSdkiOS-7.1.0
1.0.53
Added isShowingBannerAd, isShowingFullScreenAd
1.0.64
Added AdColony admob mediation plugin.
1.0.67
Added other mediation plugins.
1.0.72
Fixed Android cordova5 build error.
To-Do:
supports ios split mode
supports wp8 split mode
supports other position: 'top-left', 'top-right', 'left', 'center', 'right', 'bottom-left', 'bottom-right' on ios.
supports banner reposition when orientation changes on ios.
supports SMART_BANNER resize when orientation changes on ios.
https://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-Line%20Interface - npm install -g cordova@5.0.0
cordova plugin add cordova-plugin-ad-admob
//If you want to mediate admob with other ad networks, then install the following additional ad networks you want to mediate with.
cordova plugin add cordova-plugin-ad-admob-adcolony
cordova plugin add cordova-plugin-ad-admob-facebookads
cordova plugin add cordova-plugin-ad-admob-flurryads
cordova plugin add cordova-plugin-ad-admob-huntmads
cordova plugin add cordova-plugin-ad-admob-iad
cordova plugin add cordova-plugin-ad-admob-inmobi
cordova plugin add cordova-plugin-ad-admob-leadbolt
cordova plugin add cordova-plugin-ad-admob-lifestreetmedia
cordova plugin add cordova-plugin-ad-admob-millennialmedia
cordova plugin add cordova-plugin-ad-admob-mobfox
cordova plugin add cordova-plugin-ad-admob-mojiva
cordova plugin add cordova-plugin-ad-admob-mopub
cordova plugin add cordova-plugin-ad-admob-phunware
https://software.intel.com/en-us/intel-xdk - Download XDK - XDK PORJECTS - [specific project] - CORDOVA 3.X HYBRID MOBILE APP SETTINGS - PLUGINS - Third Party Plugins - Add a Third Party Plugin - Get Plugin from the Web -
Name: admob
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob
[v] Plugin is located in the Apache Cordova Plugins Registry
//If you want to mediate admob with other ad networks, then install the following additional ad networks you want to mediate with.
Name: admob-adcolony
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.adcolony
[v] Plugin is located in the Apache Cordova Plugins Registry
Name: admob-facebookads
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.facebookads
[v] Plugin is located in the Apache Cordova Plugins Registry
Name: admob-flurryads
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.flurryads
[v] Plugin is located in the Apache Cordova Plugins Registry
Name: admob-huntmads
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.huntmads
[v] Plugin is located in the Apache Cordova Plugins Registry
Name: admob-iad
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.iad
[v] Plugin is located in the Apache Cordova Plugins Registry
Name: admob-inmobi
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.inmobi
[v] Plugin is located in the Apache Cordova Plugins Registry
Name: admob-leadbolt
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.leadbolt
[v] Plugin is located in the Apache Cordova Plugins Registry
Name: admob-lifestreetmedia
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.lifestreetmedia
[v] Plugin is located in the Apache Cordova Plugins Registry
Name: admob-millennialmedia
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.millennialmedia
[v] Plugin is located in the Apache Cordova Plugins Registry
Name: admob-mobfox
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.mobfox
[v] Plugin is located in the Apache Cordova Plugins Registry
Name: admob-mojiva
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.mojiva
[v] Plugin is located in the Apache Cordova Plugins Registry
Name: admob-mopub
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.mopub
[v] Plugin is located in the Apache Cordova Plugins Registry
Name: admob-phunware
Plugin ID: com.cranberrygame.cordova.plugin.ad.admob.phunware
[v] Plugin is located in the Apache Cordova Plugins Registry
https://cocoon.io - Create project - [specific project] - Setting - Plugins - Custom - Git Url: https://github.com/cranberrygame/cordova-plugin-ad-admob.git - INSTALL - Save
//If you want to mediate admob with other ad networks, then install the following additional ad networks you want to mediate with.
https://github.com/cranberrygame/cordova-plugin-ad-admob-adcolony.git
https://github.com/cranberrygame/cordova-plugin-ad-admob-facebookads.git
https://github.com/cranberrygame/cordova-plugin-ad-admob-flurryads.git
https://github.com/cranberrygame/cordova-plugin-ad-admob-huntmads.git
https://github.com/cranberrygame/cordova-plugin-ad-admob-iad.git
https://github.com/cranberrygame/cordova-plugin-ad-admob-inmobi.git
https://github.com/cranberrygame/cordova-plugin-ad-admob-leadbolt.git
https://github.com/cranberrygame/cordova-plugin-ad-admob-lifestreetmedia.git
https://github.com/cranberrygame/cordova-plugin-ad-admob-millennialmedia.git
https://github.com/cranberrygame/cordova-plugin-ad-admob-mobfox.git
https://github.com/cranberrygame/cordova-plugin-ad-admob-mojiva.git
https://github.com/cranberrygame/cordova-plugin-ad-admob-mopub.git
https://github.com/cranberrygame/cordova-plugin-ad-admob-phunware.git
https://build.phonegap.com/ - Apps - [specific project] - Update code - Zip file including config.xml
<gap:plugin name="cordova-plugin-ad-admob" source="npm" />
//If you want to mediate admob with other ad networks, then install the following additional ad networks you want to mediate with.
<gap:plugin name="cordova-plugin-ad-admob-adcolony" source="npm" />
<gap:plugin name="cordova-plugin-ad-admob-facebookads" source="npm" />
<gap:plugin name="cordova-plugin-ad-admob-flurryads" source="npm" />
<gap:plugin name="cordova-plugin-ad-admob-huntmads" source="npm" />
<gap:plugin name="cordova-plugin-ad-admob-iad" source="npm" />
<gap:plugin name="cordova-plugin-ad-admob-inmobi" source="npm" />
<gap:plugin name="cordova-plugin-ad-admob-leadbolt" source="npm" />
<gap:plugin name="cordova-plugin-ad-admob-lifestreetmedia" source="npm" />
<gap:plugin name="cordova-plugin-ad-admob-millennialmedia" source="npm" />
<gap:plugin name="cordova-plugin-ad-admob-mobfox" source="npm" />
<gap:plugin name="cordova-plugin-ad-admob-mojiva" source="npm" />
<gap:plugin name="cordova-plugin-ad-admob-mopub" source="npm" />
<gap:plugin name="cordova-plugin-ad-admob-phunware" source="npm" />
Download construct2 plugin: http://www.paywithapost.de/pay?id=4ef3f2be-26e8-4a04-b826-6680db13a8c8
Now all the native plugins are installed automatically: https://plus.google.com/102658703990850475314/posts/XS5jjEApJYV
//If you want to mediate admob with other ad networks, then install the following additional ad networks you want to mediate with.
Cordova AdmobAdColony construct2 plugin
Cordova AdmobFacebookAds construct2 plugin
Cordova AdmobFlurryAds construct2 plugin
Cordova AdmobHuntMAds construct2 plugin
Cordova AdmobiAd construct2 plugin
Cordova AdmobInMobi construct2 plugin
Cordova AdmobLeadbolt construct2 plugin
Cordova AdmobLifeStreetMedia construct2 plugin
Cordova AdmobMillennialMedia construct2 plugin
Cordova AdmobMobFox construct2 plugin
Cordova AdmobMojiva construct2 plugin
Cordova AdmobMoPub construct2 plugin
Cordova AdmobPhunware construct2 plugin
var bannerAdUnit = "REPLACE_THIS_WITH_YOUR_BANNER_AD_UNIT";
var fullScreenAdUnit = "REPLACE_THIS_WITH_YOUR_FULL_SCREEN_AD_UNIT";
var isOverlap = true; //true: overlap, false: split
var isTest = true;
/*
var bannerAdUnit;
var fullScreenAdUnit;
var isOverlap = true; //true: overlap, false: split
var isTest = true;
//android
if (navigator.userAgent.match(/Android/i)) {
bannerAdUnit = "REPLACE_THIS_WITH_YOUR_BANNER_AD_UNIT";
fullScreenAdUnit = "REPLACE_THIS_WITH_YOUR_FULL_SCREEN_AD_UNIT";
}
//ios
else if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i)) {
bannerAdUnit = "REPLACE_THIS_WITH_YOUR_BANNER_AD_UNIT";
fullScreenAdUnit = "REPLACE_THIS_WITH_YOUR_FULL_SCREEN_AD_UNIT";
}
//wp8
else if( navigator.userAgent.match(/Windows Phone/i) ) {
bannerAdUnit = "REPLACE_THIS_WITH_YOUR_BANNER_AD_UNIT";
fullScreenAdUnit = "REPLACE_THIS_WITH_YOUR_FULL_SCREEN_AD_UNIT";
}
*/
document.addEventListener("deviceready", function(){
//if no license key, 2% ad traffic share for dev support.
//you can get free license key from https://play.google.com/store/apps/details?id=com.cranberrygame.pluginsforcordova
//window.admob.setLicenseKey("yourEmailId@yourEmaildDamin.com", "yourFreeLicenseKey");
window.admob.setUp(bannerAdUnit, fullScreenAdUnit, isOverlap, isTest);
//
window.admob.onBannerAdPreloaded = function() {
alert('onBannerAdPreloaded');
};
window.admob.onBannerAdLoaded = function() {
alert('onBannerAdLoaded');
};
window.admob.onBannerAdShown = function() {
alert('onBannerAdShown');
};
window.admob.onBannerAdHidden = function() {
alert('onBannerAdHidden');
};
//
window.admob.onFullScreenAdPreloaded = function() {
alert('onFullScreenAdPreloaded');
};
window.admob.onFullScreenAdLoaded = function() {
alert('onFullScreenAdLoaded');
};
window.admob.onFullScreenAdShown = function() {
alert('onFullScreenAdShown');
};
window.admob.onFullScreenAdHidden = function() {
alert('onFullScreenAdHidden');
};
}, false);
window.admob.preloadBannerAd();//option, download ad previously for fast show
/*
position: 'top-left', 'top-center', 'top-right', 'left', 'center', 'right', 'bottom-left', 'bottom-center', 'bottom-right'
size: 'BANNER' (320x50, Phones and Tablets)
'LARGE_BANNER' (320x100, Phones and Tablets)
'MEDIUM_RECTANGLE' (300x250, Phones and Tablets)
'FULL_BANNER' (468x60, Tablets)
'LEADERBOARD' (728x90, Tablets)
'SKYSCRAPER' (120x600, Tablets, ipad only)
'SMART_BANNER' (Auto size, Phones and Tablets, recommended)
*/
window.admob.showBannerAd('top-center', 'SMART_BANNER');
window.admob.showBannerAd('bottom-center', 'SMART_BANNER');
window.admob.reloadBannerAd();
window.admob.hideBannerAd();
window.admob.preloadFullScreenAd();//option, download ad previously for fast show
window.admob.showFullScreenAd();
alert(window.admob.loadedBannerAd());//boolean: true or false
alert(window.admob.loadedFullScreenAd());//boolean: true or false
alert(window.admob.isShowingBannerAd());//boolean: true or false
alert(window.admob.isShowingFullScreenAd());//boolean: true or false
example/basic/index.html
example/advanced/index.html
You can also run following test apk. https://dl.dropboxusercontent.com/u/186681453/pluginsforcordova/admob/apk.html
Plugins For Cordova
http://cranberrygame.github.io?referrer=github
FAQs
Show admob banner, interstitial and rewarded video ad
The npm package cordova-plugin-ad-admob receives a total of 3 weekly downloads. As such, cordova-plugin-ad-admob popularity was classified as not popular.
We found that cordova-plugin-ad-admob demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.