I want to keep my activity on the user's screen when the home button is pressed. According to this question, I can do so by using "TYPE_SYSTEM_ALERT".
But I keep going to homescreen on home button click...
Here's my code:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Window w = getWindow();
w.setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
setContentView(R.layout.activity_my);
...
}