I am new to Android and I'm stuck because of this problem for hours.
I have 3 activities in my project, let's say they're A, B, and C. A is the MainActivity.
A has the data B needs so B should be started after A sends the data to it with intent. I have a bottom navigation menu for each activity. When user tries to start B from Activity C,
1) I want B to not be started if A wasn't started before C
2) If A WAS started before C, I want B to be started with the received data from A.
Currently I just set intent
to the button listener in C to go to B but when B has no data from A, B crashes.
I don't know if these two would be possible? I've tried finish()
, onBackPressed()
, etc. but none of those worked as I wanted. Any help would be appreciated. Thanks.