Non destroyable full screen mobclix ads

273 Views Asked by At

Id like my full 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?

1

There are 1 best solutions below

0
On BEST ANSWER

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);
}