开发者

Non destroyable full screen mobclix ads

开发者 https://www.devze.com 2023-04-03 05:44 出处:网络
Id like my fu开发者_C百科ll screen mobclix ads to be non destroyable for 2 seconds. Right now users can press the back button on the android phone before the ad even shows up. How can I accomplish thi

Id like my fu开发者_C百科ll screen mobclix ads to be non destroyable for 2 seconds. Right now users can press the back button on the android phone before the ad even shows up. How can I accomplish this?


All you need to do is intercept the back button press which you can do by overloading:

onBackPressed()

On older devices this won't quite work and you'll need to do something like:

public boolean onKeyDown(int keyCode, KeyEvent event) 
{
  if (keyCode == KeyEvent.KEYCODE_BACK) {
    //Do something here
    return true;
  }
return super.onKeyDown(keyCode, event);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号