Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reinstate MediaPicker.CaptureVideo for Android (API 33) #18620

Merged
merged 1 commit into from
Nov 8, 2023
Merged

Conversation

jfversluis
Copy link
Member

@jfversluis jfversluis commented Nov 8, 2023

Description of Change

As reported in #17977 CaptureVideo no longer works for API 33 and up. It seems like something has changed for Android in how this works. Originally, the code would go through IntermediateActivity.OnActivityResult but on Android 13 this always has the parameter value resultCode == Result.Canceled. Changing the code to use the inline callback function in MediaPicker and not depend on IntermediateActivity seems to work.

Interesting enough, for CapturePhoto this way already changed, but for video we didn't seem to have done that. This change makes CaptureVideo inline with CapturePhoto and makes it work again for all Android versions.

Issues Fixed

Fixes #17977

@jfversluis jfversluis added t/bug Something isn't working platform/android 🤖 area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info labels Nov 8, 2023
@jfversluis jfversluis requested a review from a team as a code owner November 8, 2023 10:09
@rmarinho rmarinho merged commit 4657dbd into main Nov 8, 2023
47 checks passed
@rmarinho rmarinho deleted the fix-17977 branch November 8, 2023 13:48
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MediaPicker.CaptureVideoAsync() returns null on Android API 33 (Android 13.0)
2 participants