My onResume () activity reads some “extra” data from the intent that triggered it, and updates the interface accordingly.
I would like to add error handling: if the data in the Intent is missing / corrupted, the activity displays Toast and ends.
Is it possible to just call finish () in the onResume () method? I worry about some unexpected things, given that both of them are related to the life cycle.
If there are other better ways, I am also interested in them, but the above seems simple.
Thank!
source
share