Reputation: 2809
Android question: I am currently in Activity A and inside of A I start Activity B using startActivityForResult
. At different points in B I can set different values as the result using setResult
. While I am still inside of Activity B, is there any way for me to check what will be the current result that will be sent back to Activity A? (Or do I have to keep track of this information myself?) Thanks.
Upvotes: 0
Views: 212
Reputation: 5961
Javanator is right - the best way is to keep track of the result yourself.
However, you can make it a bit easier on yourself if you use the setResult(int resultCode, Intent data)
form of setResult
. If you maintain data
as a field in your Activity
class, then you can use it to track your current return status while also returning that same tracking object to the calling Activity
.
Upvotes: 1
Reputation: 13825
keep track of this information. though there can be methods that i am not aware of. but even though i would have preferred tracking it myself. maintaining a String variable and a getter for this in my class
Upvotes: 3