Tuesday, February 19, 2019

back stack - How to achieve the following flow in android app?

My app receives a push notification and one of its activity gets launched.
Now,





  1. Press home

  2. Relaunch app from home screen(app launched with main activity)

  3. Press back



e.g.
Activities
A-->B--->C





  1. Notification launches 'C'

  2. Press HOME on C

  3. Relaunch app ('A' gets launched)

  4. Press back



Now the weirdness appears, pressing back is taking the user to same activity that was launched on notification click, in this case its taking the user to 'C'



I do not want this flow..pressing back key on main activity should exit the app.




any help?

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...