startActivityForResult

Tadder

Member
Licensed User
Longtime User
pretty sure I've read that startActivityForResult isn't available yet for use directly in B4A?

so how do you call an activity in the middle of some code and return to that spot in the code, rather than to Activity_Resume? seems like a no-brainer, but at this point, i feel like a no-brainer-haver... :sign0104:

thanks in advance for any assistance. and Erel, VERY nice stuff here, love it!

tad
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
StartActivityForResult will not help in this case. It doesn't block the current code execution. It just sends a message to the message queue.

CallSubDelayed can help you. You can call a sub in the next activity and then when done use CallSubDelayed from the second activity to call the "next" sub in the first activity.
 
Upvote 0

Tadder

Member
Licensed User
Longtime User
thanks Erel, works great!

also for anyone viewing this thread - I learned (by browsing other threads) to close the popup window (the second activity), just put activity.finish AFTER callsubdelayed.



tad
 
Upvote 0
Top