【发布时间】:2018-06-04 00:12:47
【问题描述】:
在我当前的应用程序中,我在我的应用程序中使用从 npm 安装的 react-native-admob 包,我可以让我的广告正常显示,但我现在需要在用户关闭广告时运行一个设置函数我我只使用插页式广告类型
我已经尝试设置事件监听器来运行一个函数,并使用下面的代码将监听器放置在 compenentwillmount 中
AdMobInterstitial.addEventListener('interstitialDidClose', () => {
console.log('CLOSED');
this.AdClosed('open');
});
但是一旦打开应用程序,AdClosed 功能就会运行,我如何仅在用户关闭插页式广告时才运行功能?
【问题讨论】:
标签: react-native admob interstitial