move task to back not working properly android
android, android-activity
Solution
Don't call `super`, which invokes the default implementation of the BACK button...which is to call `finish()` on the current Activity. Just call `moveTaskToBack()` inside of your Override.
Problem
I have two activities A and B, to move from A to B you need to login. After I move to B I call finsih on A. In B activity I call movetoBack when the back button is pressed. However when I recall my App it takes me back to A. ``` @Override public void onBackPressed() { super.onBackPressed(); moveTaskToBack (true); } ```