cranberrygame / cordova-plugin-ad-admob

Other
10 stars 26 forks source link

auto start #4

Closed aurlev closed 8 years ago

aurlev commented 8 years ago

hi. it is work. i would like it the admob run auto with out the on click.so it will start when the user use the app. what is the right thing to do? (i'm new on javascript) thanks.

cranberrygame commented 8 years ago

Hi, @aurlev

Do like this in script tag:

var bannerAdUnit = "ca-app-pub-4906074177432504/9172302471"; var interstitialAdUnit = "ca-app-pub-4906074177432504/1649035673"; var isOverlap = true; //true: overlap, false: split var isTest = true;

document.addEventListener("deviceready", function(){ window.admob.setUp(bannerAdUnit, interstitialAdUnit, isOverlap, isTest);

window.admob.showBannerAd('top-center', 'SMART_BANNER');//here

}, false);

aurlev commented 8 years ago

you are awesome. thank you. i was very close almost doen the right thing but with little mistakes.

you are Certainly GREAT !

cranberrygame commented 8 years ago

@aurlev

Thanks