I connected the admob using the 'react-native-firebase' library. We plan to apply only interstitial ads. Currently, we have successfully run interstitial test ads with test id on each platform (ios, android).
However, Admob Dashboard does not call any ads if you apply the "ad unit" id.
Perhaps, does production ads only appear when an app is released? My app has not yet registered with the store and is under development.
Currently, AdMob's mediation and campaign items are untouched. Do I have to write this?
How can we generate a production ad? I need help!!!
controlAdInterstitial = () => {
// this is production unit id
const interStialId = Platform.select({
ios: staticData.admobIds.iosInterstitialId,
android: staticData.admobIds.androidInterstitialId,
});
// run intersitital
AdInterstitial(interStialId);
// test id, it's completed
// AdInterstitial(staticData.admobIds.testInterstitialId);
};
AdIntersitial
const AdIntersitial = (id) => {
const { AdRequest } = firebase.admob;
const request = new AdRequest();
const adVert = firebase.admob().interstitial(id);
adVert.on('onAdLoaded', () => {
adVert.show();
});
adVert.loadAd(request.build());
adVert.on("onAdOpened", () => {
console.log('Advert ready to show.');
});
const ad = setInterval(() => {
if (adVert.isLoaded()) {
adVert.show();
clearInterval(ad);
} else {
}
}, 2000);
};