0

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?

Michael
  • 25
  • 6

1 Answers1

1

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);
}
slayton
  • 20,123
  • 10
  • 60
  • 89