Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does someone know how to use onActivityReenter properly?

I´ve just realised that android has another method called onActivityReenter.

What is this for? can it be used like onActivityResult?

Documentation says that is used for transitions, but not 100% what for.

like image 542
Jose M Lechon Avatar asked Oct 06 '15 08:10

Jose M Lechon


1 Answers

according to the doc

The purpose of this function is to let the called Activity send a hint about its state so that this underlying Activity can prepare to be exposed. A call to this method does not guarantee that the called Activity has or will be exiting soon. It only indicates that it will expose this Activity's Window and it has some data to pass to prepare it.

so you can get data from the other activity even when it is still running. but for the onActivityResult we get the data when the activity is finished.

like image 122
stinepike Avatar answered Nov 10 '22 01:11

stinepike