我尝试从此处使用react-native-firebase模块AdMob功能: https://rnfirebase.io/docs/v5.x.x/admob/reference/RewardedVideo
当我尝试实现它时,它成功使用firebase.admob().initialize()
进行了初始化,之后,我尝试使用此代码显示有奖励的视频,但控制台中没有任何显示,也没有任何显示。有什么我想念的吗?
const advert = firebase.admob().rewarded('ca-app-unit-id')
const AdRequest = firebase.admob.AdRequest
const request = new AdRequest()
// Load the advert with our AdRequest
advert.loadAd(request.build())
advert.on('onAdLoaded', () => {
console.log('Advert ready to show.')
})
advert.show()