maui: RegisterForActivityResult does not work
Description
RegisterForActivityResult does not work correctly with MauiAppCompatActivity.
I think the issue lies in these two lines:
savedInstanceState?.Remove("android:support:fragments");
savedInstanceState?.Remove("androidx.lifecycle.BundlableSavedStateRegistry.key");
Steps to Reproduce
- Clone the repository
- Open
AndroidApp1.sln - Enable
Don't keep activitieson Device\Simulator - Add breakpoints in two projects in methods
OnActivityResult - Run
AndroidApp1 - Touch
Get result - Choose a contact
- Run
MauiApp1 - Touch
Get result - Choose a contact
Link to public reproduction project repository
https://github.com/dimonovdd/RegisterForActivityResult.MAUI
Version with bug
8.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Any
Did you find any workaround?
No response
Relevant log output
No response
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 2
- Comments: 18 (16 by maintainers)
@dimonovdd it looks like you are supposed to override:
Did that not work for you?
@PureWeen can maybe share details on why we need: