Hey Everyone, i installed admob free plugin on my ionic 3 project, and typed this
async showBanner() {
try {
const bannerConfig: AdMobFreeBannerConfig = {
id: 'ca-app-pub-APP_ID',
isTesting: false,
autoShow: true,
};
this.admobFree.banner.config(bannerConfig);
const result = await this.admobFree.banner.prepare();
console.log(result);
}
catch (e) {
console.log(e);
}
}
but the ads aren’t showing … i’m deploying on a real device with android version 6.0.
Hope to get some help, thanks !
Hi, @hamdanihamza
could you try isTesting: true
const bannerConfig: AdMobFreeBannerConfig = {
id: 'ca-app-pub-APP_ID',
isTesting: true,
autoShow: true,
};
thanks
I tried both true and false but they don’t show …
beck24
4
You have prepared the banner but haven’t shown it
this.admobFree.banner.show();
1 Like
Hey @hamdanihamza, you can check this tutorial from IonicThemes that also uses Admob Free in an Ionic 3 app.
Hope it helps!
I think the autoShow: true
is doing the job.
The code there is exactly like mine, still not working , could it have something to do with my android version ?
Thanks Guys, i reinstalled admob and it worked !! Thanks
1 Like
beck24
9
I think the autoShow: true is doing the job.
Oh yeah, sorry I didn’t see that. In my app I call the show() manually for some timing purposes…
@beck24 i reinstalled the plugin and its working fine now thanks !