Just in case anyone get's to this point. There was a modification in the source code a few weeks ago that had the Main activity to be finished, therefore, the launchMode singleTask
was not taking any effect when it came to reusing that activity and clearing the upper part of the stack via CLEAR_TOP flag. Hope anyone that comes to a similar problem checks the code to that point since navigation (util) libraries were used. Keep tabs on that.
Thus:
This was happening. A
started B
while finishing itself, leading to a stack of just B
. After the BroadcastReceiver-extended class started A
there was no previous activity A
in any of the tasks' stacks. Which created task1[B] task2[B]
task2's B
started A
and after task2
is finished, it would go back to task1
with B
which would in turn recreated A
when Up button was pressed.