MediaPicker CapturePhotoAsync need parameter for rear or front camera #25033
Unanswered
bhuwancb99
asked this question in
Ideas
Replies: 1 comment 1 reply
-
Hello, any update on this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
In the MediaPicker, the CapturePhotoAsync method currently does not provide an option to select either the rear or front camera. Please consider adding a parameter inside MediaPickerOptions to specify the desired camera type (front or back). This would make it easier to use the camera.
In my project, I need to use the front camera for taking pictures when the user punches in the system. I've tried multiple approaches without success. I also attempted the following code for Android:
intent.PutExtra("android.intent.extras.CAMERA_FACING", 1);
However, it did not work. I want this same functionality for both Android and iOS, as I plan to integrate it into my two mobile applications.
Public API Changes
new MediaPickerOptions { Title = GlobalResource.SELECT_A_IMAGE, CameraLocation=CameraLocation.Front })
Intended Use-Case
FileResult photo = await MediaPicker.Default.CapturePhotoAsync(new MediaPickerOptions { Title = GlobalResource.SELECT_A_IMAGE });
Beta Was this translation helpful? Give feedback.
All reactions