cordova-plugin-admob
cordova-plugin-admob copied to clipboard
Banner and Interstitial ads do not work together
thanks for this great plugin! i got banner ads and interstitial ads working separately, however if i put both of them together interstateial will refresh banner, instead of load full screen ads. any suggestions would be greatly appreciated! thank you.
same issue here pls help
also have the same issue, would be great if you could have both at once
hi artgrape. how did you managed to make interstitial ads to work? because i can't see any ad on my phone.
hello i used exactly thte same example code the author provided. i am moving from mopub. they have a simpler interface.
On Thu, Apr 17, 2014 at 4:46 PM, adys123 [email protected] wrote:
hi artgrape. how did you managed to make interstitial ads to work? because i can't see any ad on my phone.
— Reply to this email directly or view it on GitHubhttps://github.com/aliokan/cordova-plugin-admob/issues/6#issuecomment-40721998 .
do you mean this?
admob.createInterstitialView(
{
'publisherId': 'INSERT_YOUR_PUBLISHER_ID_HERE'
},
successCallback,
failureCallback);
well..if a insert this one, do i need i trigger or something like that? i mean when a user click a link, an add will be shown?
sorry, won't be able to help more here, as i didn't wrote the code myself, i hired a developer to do it for me. and it didn't work at first, and i told him to look at the sample code, he did and it worked. perhaps the easiest is to just to build the sample project, get that work, then retro fit piece by piece into your own project. good luck!!
On Sat, Apr 19, 2014 at 10:13 PM, adys123 [email protected] wrote:
do you mean this?
admob.createInterstitialView( { 'publisherId': 'INSERT_YOUR_PUBLISHER_ID_HERE' }, successCallback, failureCallback);
well..if a insert this one, do i need i trigger or something like that? i mean when a user click a link, an add will be shown?
— Reply to this email directly or view it on GitHubhttps://github.com/aliokan/cordova-plugin-admob/issues/6#issuecomment-40879447 .
Hello people, add these lines in executeRequestAd function in AdMobPlugin.java file for interstitial ads to work
if (adView != null)
{
requestAd(isTesting, inputExtras, callbackContext);
}
if (intertitial != null)
{
requestIntertitial(isTesting, inputExtras, callbackContext);
}
if(intertitial == null && adView == null)
{
callbackContext
.error("adView && intertitial are null. Did you call createBannerView?");
return;
}
I got around this my killing the banner before opening an interstitial. then killing the interstitial and recreating the banner on onDismissScreen listener
Hi, the code provided by the author isn't enough to make an interstitial. You need to requestAd in the success callback. I don't understand why the author doesn't correct the doc, it would save people a lot of time. Yet here it is :
var inter_ios_key = 'xxxxxx';
var inter_android_key = 'xxxxxx';
var interId = (navigator.userAgent.indexOf('Android') >=0) ? inter_android_key : inter_ios_key;
admob.createInterstitialView(
{
'publisherId': interId
},
function() { // success callback
admob.requestAd(
{
'isTesting': false
},
function(){
// success
},
function(){ // failure
alert("request error");
}
);
},
function() { // failure callback
alert('createInterstitial fail');
}
);
i try today with Interstitial ads ,@Thibka code very helpful to me. and i know how to ad banner ads already . i combine both BANNER and Interstitial and its working perfectly.