npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

huedawn-plugin-admob-free

v0.4.39

Published

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.

Downloads

74

Readme

Forked from https://github.com/ratson/cordova-plugin-admob-free - Rona Dini Hari ([email protected])

Cordova AdMob Plugin

A free, no ad-sharing version of Google AdMob plugin for Cordova.

Features

Compare to other projects

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.

Installation

cordova plugin add cordova-plugin-admob-free --save

Usage

1. Ceate Ad Unit ID for your banner and interstitial.

Go to AdMob portal, click "Monetize a new app" button to create new ad unit.

2. Define configiration for differrent platforms.

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',
  };
}

3. Set options

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
});

4. Display advertisements

Banner Ad

// Create banner
AdMob.createBannerView();

// Close the banner
AdMob.destroyBannerView();

// Hide the banner
AdMob.showAd(false);

// Show the banner
AdMob.showAd(true);

Interstitial Ad

// 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();

5. Profit

Screenshots

Android Banner | Android Interstitial --------------------------------|-------------------------------------------- ScreenShot | ScreenShot

iPhone Banner | iPhone Interstitial --------------------------------|-------------------------------------------- ScreenShot | ScreenShot

API

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() {});

Status

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.

Contributing

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.

Credits

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.

Disclaimer

This is NOT an official Google product. It is just a community-driven project, which use the Google AdMob SDKs.

License

MIT