Activity.setResult (int) and activity life cycle

Does Activity support the result after Activity.setResult(int) was called and the device was rotated before pressing the return button (activity was recreated)?

Activity does not seem to recover such information. If so, should I restore the result using the Bundle and call setResult again?

+4
source share
1 answer

In a word, yes. The result is not returned until you call finish (). setResult () assumes that the Activity parameter (Activity Result B) was started by calling startActivityForResult () from another action (call it Activity A). Operation B is supposed to end, resulting in an automatic return to activity B.

+2
source

All Articles