Configure to use only front camera
See original GitHub issueIs your feature request related to a problem? Please describe.
When starting with cameraOnly()
I would like to be able to set ImagePicker to either A) only allow the front camera or B) start with the front camera and allow the user to switch to the rear camera.
Describe the solution you’d like
For either of the cases above, a config option similar to cameraOnly
like frontCameraOnly
or startFrontCamera
that either restricts user to front camera, or starts them off with it.
Describe alternatives you’ve considered I tried overriding the provider methods in library, but haven’t had much luck with it.
Additional context Basically I’m using this library to capture or pick profile photos. Those are typically taken as selfies and not from the rear camera.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
@Drjacky Update below function in IntentUtils this class:- https://github.com/Drjacky/ImagePicker/blob/master/imagepicker/src/main/kotlin/com/github/drjacky/imagepicker/util/IntentUtils.kt
This is working for me
@Drjacky would you recommend I copy those Intent extras to use this, or somehow try to set
tryFrontCamera
by intercepting the provider? Not sure what the ideal usage would be. Also thanks @ArisChoice for the update!