How can i do that?
Current solution
I launch a transparent activity, that catches the back press, forwards it to my service and closes itself af
I think I found out how it works... DON'T USE WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
in your overlays views + overwrite the dispatchKeyEvent
of your view:
@Override
public boolean dispatchKeyEvent(KeyEvent event)
{
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK)
{
// handle back press
// if (event.getAction() == KeyEvent.ACTION_DOWN)
return true;
}
return super.dispatchKeyEvent(event);
}