I have 3 pages
- page A - lists contacts
- page B - pops up on clicking a notification
- page C - pops up after clicking snooze on page B
I had this post which technically as asked works but now I have gained more clarity resulting in a follow up question.
Desired back button behavior
- User clicks notifciation
- user lands on page B and clicks snooze
- user clicks back button (This broke with my impl of the answer in the other post)
- DESIRED: user lands on page B so he can choose other
Desired behavior if user is on page A when notification is clicked
- User clicks notification
- user lands on page B and clicks snooze
- user lands on page C and clicks 10 minutes
- DESIRED: both page B and C 'finish()' and land on page A
Desired behavior if user is not in my app at all
- user lands on page B and clicks snooze
- user lands on page C and clicks 10 minutes
- DESIRED: both page B and C 'finish()' and land back on whatever app they were in
After the answer to that question, I modified my code to call finish on button click on page B BUT this makes the page disappear. I think I need to delay calling finish on page B. I think I want when the user clicks 10 minutes button on page C..
finish();
previousActivity.finish();
Is this the wrong way to do it? AND how to get the previous Activity so I can call finish on it to the next activity so he can call it? or is my thinking all wrong?
EDIT: I did find this post
but it is very cryptic having only been into android for a week now. Anyone have links on tutorials on this stuff? Perhaps I need a book for a deeper dive.