I have an activity (first) that starts a new activity (second). If I returned to my first activity, I want to get some settings I’ve set at the second activity, without saving in SharedPreferences (just temporary).
Is there a way to get public attributes of my second activity?
How can I do that on the best way?
I have an activity (first) that starts a new activity (second). If I returned
Share
The best way you can get information returned from the second activity is to invoke it with
startActivityForResult.From Android documentation:
And then, in
Activity1override this:Here’s a link to referring documentation.
Hope it helps.