Description
In net10.0-android apps using multiple activities, PickPhotosAsync does not return when used in a child activity until you return to the main app activity.
The image picker does show and you can select your image, but then it does not return to the calling method.
This used to work until Commit 0c25c62 (0c25c62) which stops the registration of a new activities against ActivityForResultRequest.
This makes the app wait until the main activity is resumed before the selected image is returned.
This used to work on Android and doing a similar in an iOS app still works.
Steps to Reproduce
- Create an activity that is not the main Activity.
- Add the implementation for MediaPicker.
- Call PickPhotosAsync and await the Task.
- The picker UI will show.
- Select an image.
- The task will not return until the current activity is closed and the main activity is returned to.
Link to public reproduction project repository
https://github.com/ben-dean/MediaPicker
Version with bug
10.0.20
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
10.0.11
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
Description
In net10.0-android apps using multiple activities, PickPhotosAsync does not return when used in a child activity until you return to the main app activity.
The image picker does show and you can select your image, but then it does not return to the calling method.
This used to work until Commit 0c25c62 (0c25c62) which stops the registration of a new activities against ActivityForResultRequest.
This makes the app wait until the main activity is resumed before the selected image is returned.
This used to work on Android and doing a similar in an iOS app still works.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/ben-dean/MediaPicker
Version with bug
10.0.20
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
10.0.11
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output