In answering this question please take into consideration the fact that I'm an Android newbie.
In my app Activity A explicitly calls Activity B, which has to supply it with some data from the user (i.e. a date). Activity B returns when the user presses the Done button.
But in the case that the user presses the Back button, what I get is a Runtime exception failure delivering result.
Any clue?
Most likely the problem is that you need to check for a cancelled result in Activity A.
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == Activity.RESULT_CANCELLED) {
// Do something
}
}
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