And again about Android activities back stack magic. So I have two activities A→B (playlist A and player B), and I want the app should always close when Back pressed in A. But it doesn't.
Both activities launches as singleTop
, B also has android:excludeFromRecents="true"
and defined A as parent. B goes back to A with following flags Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK
.
Everything works fine except the next case: A→B, Home pressed, Launch app again from desk and got A opened, Press Back button, Here app should be closed but B shown again.
Any suggestions? Thanks!