gpt4 book ai didi

firebase - 我没有看到任何 admob 制作广告。在 native react

转载 作者:行者123 更新时间:2023-12-04 15:50:44 25 4
gpt4 key购买 nike

我使用“react-native-firebase”库连接了 admob。我们计划只应用插页式广告。目前,我们已经在各个平台(ios、android)上成功转换了带有test id的插屏测试广告。

但是,如果您应用“广告单元”id,Admob 控制面板不会调用任何广告。

也许,生产广告只在应用发布时出现吗?我的应用尚未在商店注册,正在开发中。

目前,AdMob 的中介和广告事件项目未受影响。我必须写这个吗?

我们如何生成制作广告?我需要帮助!!!

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);
};

插播广告

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);
};

最佳答案

When apps are newly registered with AdMob, it takes some time and a few ads requests to allow inventory to build. Because of this, you may not see live impressions immediately. Once your app starts making more requests, you should see more consistent results. Please note that test ads operate through the same channels as live ads. Being able to return a test ad ensures that your application is communicating properly with our network. Be patience it will work after some days.

按照建议,等待几个小时或一天,如果广告 ID 是新创建的,则需要一些时间才能在您的广告 ID 中分配一些广告。

Source

关于firebase - 我没有看到任何 admob 制作广告。在 native react ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53865181/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com