Android app dev: Intent extras set in onBackPressed() misssing when back to onActivityResult()

Last updated on

Written by

on

in

, , ,

It’s funny how we spent about an hour trying to figure out why the Intent extras that we’re setting are not being sent back to onActivityResult(). If we only knew that the solution was as simple as moving one line of code.

The call to super.onBackPressed() should be placed after setting Intent extras and after finishing the current activity. Like so:

Related Posts

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *