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

com.admob.plugin

v5.5.0

Published

Google AdMob plugin for Cordova, Phonegap and Intel XDK ,support ios and android,support admob v1 and admob v2 ,Monetize your app with one javascript line.simple and easy to use api.build on admob ios 7.6 and admob android sdk 8 project home:https

Downloads

17

Readme

admob phonegap plugin(cordova plugin for admob)

Google AdMob plugin for Cordova, Phonegap and Intel XDK ,support ios and android,support admob v1 and admob v2 ,Monetize your html5 app with one javascript line.api is easy to use. admob phonegap plugin(admob cordova plugin) is built base on

  • phonegap 3.4 or cordova 6.0
  • admob ios sdk 7.14.0
  • admob android sdk 9
  • project home:https://github.com/admob-google/admob-cordova
  • project can been used with no limit

1.install admob phonegap plugin

install with npm

npm install admob
cordova plugin add admob

use the cordova command download the plugin ,then install with local location

cordova plugin add c:\phonegap-admob-plugin 

or install cordova plugin online

cordova plugin add com.admob.plugin

use the phonegap command download the plugin ,then install with local location

phonegap plugin add c:\phonegap-admob-plugin 

use phonegap builder ,add config

<gap:plugin name="com-admob-plugin" version="5.5.0" source="npm"/>

2.init admob phonegap plugin

init plugin after deviceready event

admob.initAdmob("admob banner ID","admob interstitial ID");//admob id format ca-app-pub-xxxxxxxxxxxxxxxxxxx/xxxxxxxxxx

3.show banner at relation position

there are some banner size in admob.BannerSize,and you can create your own banner size that is available in admob platform. admob.Position hold all relation position const .

admob.showBanner(admob.BannerSize.BANNER,admob.Position.TOP_APP);//show banner at the top of app 

and more you can set more param for admob such as test mode and is your app made for child.

	var admobParam=new  admob.Params();
        //admobParam.extra={'keyword':"admob phonegame"};
        //admobParam.isForChild=true;
        admobParam.isTesting=true;
        admob.showBanner(admob.BannerSize.BANNER,admob.Position.TOP_CENTER,admobParam);

4.show banner at absolute position

you can put admob banner at absolute position as easy as relation position.

admob.showBannerAbsolute(admob.BannerSize.BANNER,0,70);//show banner at absolute position x 0,y 70

5.show admob Interstitial

show admob Interstitial in phonegap,cordova or xdk application is the same step. cache Interstitial ,and then show it in onInterstitialReceive function or show it when your game over.

 document.addEventListener(admob.Event.onInterstitialReceive, onInterstitialReceive, false);//show in ad receive event fun need add receive listener
 admob.cacheInterstitial();// load admob Interstitial
 function onInterstitialReceive(message) {//show in ad receive event fun
     admob.showInterstitial();
 }
 function onGameOver(){//call this fun to show when game over
        admob.isInterstitialReady(function(isReady){
            if(isReady){
                admob.showInterstitial();
            }
        });
  }

6.handle admob ad event

you can handler all native event of admob ,as onInterstitialReceive all event type is in admob.Event

function onAdmobEvent (message) {
    //do some on admob event
}
document.addEventListener(admob.Event.onAdmobBannerDismiss, onAdmobEvent, false);
document.addEventListener(admob.Event.onAdmobBannerFailedReceive), onAdmobEvent, false);
document.addEventListener(admob.Event.onAdmobBannerLeaveApplication), onAdmobEvent, false);
document.addEventListener(admob.Event.onAdmobBannerPresent), onAdmobEvent, false);
document.addEventListener(admob.Event.onAdmobBannerReceive), onAdmobEvent, false);
document.addEventListener(admob.Event.onAdmobInterstitialDismiss), onAdmobEvent, false);
document.addEventListener(admob.Event.onAdmobInterstitialFailedReceive), onAdmobEvent, false);
document.addEventListener(admob.Event.onAdmobInterstitialLeaveApplication), onAdmobEvent, false);
document.addEventListener(admob.Event.onAdmobInterstitialPresent), onAdmobEvent, false);
document.addEventListener(admob.Event.onAdmobInterstitialReceive), onAdmobEvent, false);

7.more function

1.hide admob banner

admob.hideBanner()

2.test if Interstitial has loaded success

admob.isInterstitialReady(function(isReady){
    if(isReady){
        alert("admob Interstitial loaded");
    }
});

3.for more usage ,ref to files in Example folder ,it is a good way to get start

  1. Admob sdk for ios used IDFA ,so remember to check up app service as ad.

email:[email protected]

Screenshots (banner Ad / interstitial Ad)

ScreenShot ScreenShot