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.
huedawn-plugin-admob-free
Advanced tools
Robust, reliable and easy to use Cordova Admob plugin for Android, iOS and Windows phone. Allows preloading and automatic loading of interstitials and banners plus more.
Forked from https://github.com/ratson/cordova-plugin-admob-free - Rona Dini Hari (rona.dinihari@gmail.com)
A free, no ad-sharing version of Google AdMob plugin for Cordova.
No Ad-Sharing
Unlike some other plugins, this plugin does not share your advertising revenue by randomly display developer's owned ads.
Fully Open Sourced
Except Google provided AdMob SDKs, every line of code are on Github. You don't execute compiled binary without seeing the source code.
No Remote Control
Do not send your application information to a remote server to control whether ad could be displayed. Therefore, you don't lose revenue because some server bugs,
Project | No Ad-Sharing | Fully Open Sourced | No Remote Control |
---|---|---|---|
admob | Not Sure | ❌ ❌ | Not Sure |
cordova-admob | ❌ | ✅ | ✅ |
cordova-plugin-ad-admob | ❌ | ✅ | ✅ |
cordova-plugin-admob-free | ✅ | ✅ | ✅ |
cordova-plugin-admob-simple | ❌ | ✅ | ✅ |
cordova-plugin-admobpro | ❌ | ❌ ❌ | ❌ ❌ |
Click ❌ to see the detail.
cordova plugin add cordova-plugin-admob-free --save
Go to AdMob portal, click "Monetize a new app" button to create new ad unit.
var admobid = {};
if ( /(android)/i.test(navigator.userAgent) ) { // for android & amazon-fireos
admobid = {
banner: 'ca-app-pub-xxx/xxx',
interstitial: 'ca-app-pub-xxx/xxx',
};
} else if ( /(ipod|iphone|ipad)/i.test(navigator.userAgent) ) { // for ios
admobid = {
banner: 'ca-app-pub-xxx/xxx',
interstitial: 'ca-app-pub-xxx/xxx',
};
} else { // for windows phone
admobid = {
banner: 'ca-app-pub-xxx/xxx',
interstitial: 'ca-app-pub-xxx/xxx',
};
}
AdMob.setOptions({
publisherId: admobid.banner,
interstitialAdId: admobid.interstitial,
bannerAtTop: false, // set to true, to put banner at top
overlap: true, // set to true, to allow banner overlap webview
offsetTopBar: false, // set to true to avoid ios7 status bar overlap
isTesting: false, // receiving test ad
autoShow: false, // auto show interstitial ad when loaded
});
// Create banner
AdMob.createBannerView();
// Close the banner
AdMob.destroyBannerView();
// Hide the banner
AdMob.showAd(false);
// Show the banner
AdMob.showAd(true);
// prepare and load ad resource in background, e.g. at the beginning of game level
AdMob.prepareInterstitial({
interstitialId: admobid.interstitial,
autoShow: false,
});
// show the interstitial later, e.g. at end of game level
AdMob.showInterstitial();
Android Banner | Android Interstitial |
---|---|
iPhone Banner | iPhone Interstitial |
---|---|
Methods:
// set default value for other methods
AdMob.setOptions(options, success, fail);
// use banner
AdMob.createBannerView();
AdMob.destroyBannerView();
AdMob.showAd();
// use interstitial
AdMob.prepareInterstitial(adId/options, success, fail);
AdMob.showInterstitial();
// low-level methods
AdMob.createInterstitialView();
AdMob.requestInterstitialAd();
AdMob.showInterstitialAd();
Events:
document.addEventListener('onReceiveAd', function() {});
document.addEventListener('onFailedToReceiveAd', function(data) {});
document.addEventListener('onPresentAd', function() {});
document.addEventListener('onDismissAd', function() {});
document.addEventListener('onLeaveToAd', function() {});
document.addEventListener('onReceiveInterstitialAd', function() {});
document.addEventListener('onPresentInterstitialAd', function() {});
document.addEventListener('onDismissInterstitialAd', function() {});
This plugin is forked from cordova-plugin-admob-simple and removed the ad-sharing related code. All APIs are remaining the same as the original fork.
For Android, there are also some enhanced options. If anyone wants them on iOS, please open an issue and let me know.
If you find this plugin useful, please star it on Github.
You can use this Cordova plugin for free. You can contribute to this project in many ways:
Help with documentation is always appreciated and can be done via pull requests.
Thanks for the cordova-plugin-admob-simple author for forking the original project cordova-plugin-admob to make it functional and open source it.
Screenshots are copied from cordova-admob-pro.
This is NOT an official Google product. It is just a community-driven project, which use the Google AdMob SDKs.
FAQs
Robust, reliable and easy to use Cordova Admob plugin for Android, iOS and Windows phone. Allows preloading and automatic loading of interstitials and banners plus more.
The npm package huedawn-plugin-admob-free receives a total of 2 weekly downloads. As such, huedawn-plugin-admob-free popularity was classified as not popular.
We found that huedawn-plugin-admob-free 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.