MediaPicker CapturePhotoAsync need parameter for rear or front camera #25033
Unanswered
bhuwancb99
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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