Does anyone know how to use onActivityReenter correctly?

I just realized that android has another method called onActivityReenter .

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

The documentation says that it is used for transitions, but not for 100% for what.

+6
source share
1 answer

according to the document

The purpose of this function is to allow the called activity to send a hint about its state so that this basic activity can prepare for exposure. Calling this method does not guarantee that the called activity will be or will soon exit. This only indicates that it will display this activity window, and it has some data to prepare it.

so you can get data from another activity, even if it is still working. but for onActivityResult we get data when activity is completed.

+6
source

All Articles