im trying to add ads to my android phonegap app but im not getting anywere... i use phonegap 0.3.3
my admob key ad key is like: ca-app-pub-9718633180389415/1973821888
im my config.xml i have:
<plugin name="com.admob.google" spec="4.0.8" source="pgb" />
and then tryed on my index:
function onDeviceReady() {
document.removeEventListener('deviceready', onDeviceReady, false);
// Set AdMobAds options:
admob.setOptions({
publisherId: "ca-app-pub-9718633180389415/1973821888", // Required
interstitialAdId: "ca-app-pub-9718633180389415/1973821888", // Optional
tappxIdiOs: "/XXXXXXXXX/Pub-XXXX-iOS-IIII", // Optional
tappxIdAndroid: "/XXXXXXXXX/Pub-XXXX-Android-AAAA", // Optional
tappxShare: 0.5 // Optional
});
// Start showing banners (atomatic when autoShowBanner is set to true)
admob.createBannerView();
// Request interstitial (will present automatically when autoShowInterstitial is set to true)
admob.requestInterstitial();
}
but noting is displayd: im using https://github.com/sunnycupertino/cordova-plugin-admob-simple
Not sure if this is useful, but I thought I was using the same plugin as you, when, in fact, I was using this one:
https://github.com/admob-google/admob-cordova
To use that plugin, I wrote the following code:
I call
AdmobManager.initAdmob()before I even show the login screen, and then, after login, I callAdmobManager.enableAdmobInterstitial().Of course, once you're done testing, you'll want to change
isTestingto false.