编程关闭一个内广告 [英] programmatically close an Interstitial ad
问题描述
我要确保使用了Android SDK的AdMob Android上间质性广告,可以关闭? 某些搜索后,它在我看来,这是不可能的,因为广告是一个单独的活动。 我想要做的是5秒后关闭该广告。 可有人告诉我,关闭的插页式广告是不可能的,如果有另外一个黑客?
I want to make sure that Interstitial ads on android using the android admob sdk, can be closed ? After some search it seem to me that this is not possible due to the ad being a separate activity. what i want to do is close the ad after 5 seconds. Can someone assure me that closing the the interstitial ad is impossible and if there's another hack ?
推荐答案
这将是一个非常晚的答案,但我遇到了类似的问题。一个小窍门可以以编程方式调用的返回按钮事件。
It's going to be a very late answer but I faced similar issue. A trick can be to call the back button event programmatically.
this.dispatchKeyEvent(新的KeyEvent(KeyEvent.ACTION_DOWN,KeyEvent.KEY code_BACK));
由于每当你在后退按钮preSS的页内广告被关闭,以便发射的返回按钮事件将最终关闭插页式广告。其余的取决于需求。
As whenever you press on back button the interstitial ad is closed so firing the back button event will eventually close the interstitial ad. Rest depends on the requirement.
这篇关于编程关闭一个内广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!