Reputation: 103
I am trying to create admob ads in my phonegap application.
so I followed this 2 links but I could not understand why it is not working.
it is not giving me any error. it just not don't showing this error.
document.ready(function(){
window.plugins.AdMob.createBannerView(
{
'publisherId': 'INSERT_YOUR_PUBLISHER_ID_HERE',
'adSize': AdMob.AdSize.BANNER
},
successCallback,
failureCallback
);
logCreateBannerSuccess();
window.plugins.AdMob.requestAd(
{
'isTesting': false,
'extras': {
'color_bg': 'AAAAFF',
'color_bg_top': 'FFFFFF',
'color_border': 'FFFFFF',
'color_link': '000080',
'color_text': '808080',
'color_url': '008000'
},
},
successCallback,
failureCallback
);
});
I dont understand where i am going wrong.
please help me out.
thanks in advance.
Upvotes: 0
Views: 622
Reputation: 20196
Perhaps there is no ad to show. Look in your logs to confirm this. You could also request test ads to confirm that it is working.
How to ask for test ads:
GADRequest *request = [GADRequest request];
// Make the request for a test ad. Put in an identifier for
// the simulator as well as any devices you want to receive test ads.
request.testDevices = [NSArray arrayWithObjects:
@"MY_SIMULATOR_IDENTIFIER",
@"MY_DEVICE_IDENTIFIER",
nil];
For more details see https://developers.google.com/mobile-ads-sdk/docs/admob/intermediate#ios
Upvotes: 1