如何使用“ expo-ads-admob”在插页式广告中添加间隔

时间:2020-05-22 08:12:58

标签: react-native admob expo

我正在使用Expo开发ReactNative应用,并在其中添加了来自“ expo-ads-admob”的插页式广告。我想每60秒显示一次插页式广告。但它只是在打开一个广告后显示一个广告,然后没有广告。请帮我解决这个问题。

import {
  AdMobInterstitial,setTestDeviceIDAsync
} from 'expo-ads-admob';

export default class App extends Component {

 
  async componentDidMount(){
    await setTestDeviceIDAsync('EMULATOR');
      AdMobInterstitial.setAdUnitID('ca-app-pub-6726786803906385/1416335240'); 
      await AdMobInterstitial.requestAdAsync({ servePersonalizedAds: true});
     
      await AdMobInterstitial.showAdAsync();
     
   
    
  }

  render() {
    return (        
         
------------------
            
       
    );
  }
}

1 个答案:

答案 0 :(得分:0)

好吧,经过如此多的尝试,我得到了这个问题的答案,我想与大家分享;

true = true