on-internet
← Community

registerForActivityResult not working when second activity orientation changes

Stack Overflow ·

I am calling activity B from activity A using the ActivityResultLauncher and setting the result from activity B when the task is done. This works perfectly if orientation is not changed. The problem is when I change orientation from activity B and then setting the result, then registerForActivityResult of activity A is not called. Could someone let me know, what could be the issue? Note: I do not face this issue if I am using startActivityForResult and onActivityResult. I changed this to ActivityResultLauncher as startActivityForResult became deprecated. activity A sample code: private lateini

Comments

Sign in or sign up to comment and upvote.

No comments yet.