I installed admob-free cordova plugin and also implemented to my application. It shows pretty fine the test ads , but i have an issue when i ise my admob units for my ads. It doesnt show them at all , even though they count as view pages on adsense website. I tried changing the admobconfig.java changing test ids with my id and it worked fine but ads have a little badge saying test ad om the upper corner. Do you guys know any solution to this?
Hello,
Just set isTesting = false
here demo
1 Like
Thanks a lot , i already uploaded the app to app store will it be a problem if i reupload again?
yes, You can upload again,
// Banner
private static final String TEST_BANNER_ID = "ca-app-pub-3940256099942544/6300978111";
private String bannerAdUnitId = "ca-app-pub-5460630490406737/xxxxxxxxxx";
public AdSize adSize = AdSize.SMART_BANNER;
if (options.has(OPT_IS_TESTING)) {
this.isTesting = false;
}
this is what i did but still nothing shows up
also this is how my ts module looks like
import { Injectable } from "@angular/core";
import {
AdMobFree,
AdMobFreeBannerConfig,
AdMobFreeInterstitialConfig,
AdMobFreeRewardVideoConfig
} from '@ionic-native/admob-free/ngx';
import { Platform } from '@ionic/angular';
@Injectable()
export class AdmobFreeService {
//Interstitial Ad's Configurations
interstitialConfig: AdMobFreeInterstitialConfig = {
autoShow: false,
id: "ca-app-pub-5460630490406737/xxxxxxxxxx"
};
constructor(private admobFree: AdMobFree, public platform: Platform) {
platform.ready().then(() => {
// Load ad configuration
this.admobFree.interstitial.config(this.interstitialConfig);
//Prepare Ad to Show
this.admobFree.interstitial.prepare()
.then(() => {
// alert(1);
}).catch(e => alert(e));
});
//Handle interstitial's close event to Prepare Ad again
this.admobFree.on('admob.interstitial.events.CLOSE').subscribe(() => {
this.admobFree.interstitial.prepare()
.then(() => {
}).catch(e => alert(e));
});
}
InterstitialAd() {
//Check if Ad is loaded
this.admobFree.interstitial.isReady().then(() => {
//Will show prepared Ad
this.admobFree.interstitial.show().then(() => {
})
});
}
BannerAd() {
let bannerConfig: AdMobFreeBannerConfig = {
autoShow: true,
id: "ca-app-pub-5460630490406737/xxxxxxxxxx"
};
this.admobFree.banner.config(bannerConfig);
this.admobFree.banner.prepare().then(() => {
// success
}).catch(e => alert(e));
}
}
In my case ads are not showing so after upload i created new app on admob then add in app and upload again in platstore