New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle result if activity is destroyed #11
Comments
No, it doesn't. Alligator uses |
So there is no way build build something like goBackToWithResult ? the flag Intent.FLAG_ACTIVITY_FORWARD_RESULT allow to forward a result to the parent of the parent if the parent if finished. |
I suppose it is possible. I will think this through. |
I found that this flag also have its flaws as depending of activities count in the flow it's hard to manage something that always works. I have another lead though we can always start activities for results, as I think this is what you already do, and always finish if result is ok but not handled. what do you think about this ? |
Thank you for the good ideas. So I decided to pass a result directly from the last activity to the first one in the chain through |
Nice job on the branch ! One thing thought, I think on newIntent is not called if the activity was destroyed and the intent would be passed in onCreate. So both methods should call the code that handle the resutlt according to http://www.helloandroid.com/tutorials/communicating-between-running-activities. It's an old link but I didn't found any thing clearer than this. |
No, result handling should not be called in onCreate, because getIntent() will return an intent that started an activity, but not the one that was used to go back to it. |
While I understand you point I still think that an activity can be in the back stack and been killed then recreated |
I have checked that |
Version 2.2.0 with this feature is released. |
Hi,
Would this lib allow a result to be passed across multiple activities like :
A need result D produce result But B is destroyed by android
A -> B (destroyed) -> C -> D
The text was updated successfully, but these errors were encountered: