Tuesday 19 February 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

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...