I have an android app, which has HomeActivity
as the parent activity of all other activities. meaning - I always have an instance of it, and if you press the back button from any activity it will take you to this activity.
Now, there is an option to launch the app from a notification.
When the user clicks the notification, I start RidesActivity
(one of the other activites), and in this case if I press back, it closes the app (no instance of HomeActivity
).
What can I do in order to start an instance of HomeActivity
to the background, and make sure that if the user click back, it will go to HomeActivity
?