android-Camera2Video icon indicating copy to clipboard operation
android-Camera2Video copied to clipboard

Front camera ?

Open thamer898 opened this issue 10 years ago • 5 comments

Hello

i need to get the front camera but when i changed this line " String cameraId = manager.getCameraIdList()[0];" the record button disappear ?

Regards

thamer898 avatar Jun 10 '16 23:06 thamer898

In function setUpCameraOutputs(int width, int height){}

You change if (facing != null && facing == CameraCharacteristics.LENS_FACING_FRONT) { continue; } => if (facing != null && facing == CameraCharacteristics.LENS_FACING_BACK) { continue; }

huyquyet avatar Jun 30 '16 07:06 huyquyet

I got to record with the front camera. Be sure you follow my steps, according to my last post: (http://stackoverflow.com/a/39309158/2606290)

ferPrieto avatar Sep 03 '16 16:09 ferPrieto

I fixed this by setting camera id as cameraId = manager.getCameraIdList()[1];

phundal209 avatar Mar 20 '17 20:03 phundal209

String cameraId = manager.getCameraIdList()[1];

bahiamartins avatar Aug 16 '17 21:08 bahiamartins

This sample has been migrated to a new location where we can accept Pull Requests (check README for more information).

As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.

If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!

codingjeremy avatar Sep 19 '19 22:09 codingjeremy