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

UseFrontCameraIfAvailable does not work on Android. #2

Open
ivoryguard opened this issue Dec 1, 2019 · 1 comment
Open

UseFrontCameraIfAvailable does not work on Android. #2

ivoryguard opened this issue Dec 1, 2019 · 1 comment

Comments

@ivoryguard
Copy link

Hello.

I found that UseFrontCameraIfAvailable did not work on Android devices.

I inspected github repository sources and found that front camera was always bypassed by code like this;

// We don't use a front facing camera in this sample.
var facing = (Integer)characteristics.Get(CameraCharacteristics.LensFacing);
if (facing != null && facing == (Integer.ValueOf((int)LensFacing.Front)))
{
          continue;
 }

If you implement UseFrontCameraIfAvailable support on Android, it will be best.

In addition, if it is possible to select or set a target camera for previewing, it will be very helpful. Current Android implementation may use first non-front camera.

Best regards.

@kristiandamian
Copy link

I added a pull request with a fix for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants