I have a code that will prompt user to send a message by selecting the desired application, how can I detect if the user actually have chose from the options or instead pressed Back?
I tried to check if the intent returned something, but is running asyncronous so cannot be tracked.
Also I have tried to run the intent with startActivityForResult
, what I noticed in onActivityResult that resultCode is always 0(RESULT_CANCELED
) even if user selected, or not from the chooser.
From Android's source, you can see that the Activity that chooses among Intents doesn't setResult() at all. That should be requested as a feature.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With