Hi,
I want my app to start, after the back button was pressed 3x.
So I got this class which is executed in the Launcher.
This code works, if it s implemented in the launcher class, but it does not work, if the app is in the background. How or which key listener do I need for listening to background keys or more if the app is working only in the background?
I want my app to start, after the back button was pressed 3x.
So I got this class which is executed in the Launcher.
Code:
public class KeyManager extends Activity {
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if(KeyEvent == "Back key"){
Log.e("KM", "PRESSED!!!!!"+keyCode);
}
//return super.onKeyDown(keyCode, event);
return false;
}
}
This code works, if it s implemented in the launcher class, but it does not work, if the app is in the background. How or which key listener do I need for listening to background keys or more if the app is working only in the background?