I am using moveTaskToBack() method in my activity.
When I am pressing back button the activity still is visible. The back key does not work. What did I do wrong here? I want to navigate back to the previous activity.
public void onBackPressed() {
// TODO Auto-generated method stub
moveTaskToBack(true);
new Finalizer().killApp(false);
super.onBackPressed();
}
The purpose of moveTaskToBack:
http://developer.android.com/reference/android/app/Activity.html
What you could do is:
Maybe this: Android: Go back to previous activity
Something similar in your
onBackPressed()aftersuper.OnBackPressed();Also make sure when you’re hitting your back button, you’re actually going in this method.