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

can I set default values before camera starting programically?

Open dphans opened this issue 9 years ago • 3 comments

For example, If I need to set default camera is front before camera start, can I do that? (I impossible to change layout xml attributes, because user can change default camera in settings, I stored it in SharedPreferences instance).

dphans avatar Apr 01 '17 04:04 dphans

Please take a look at the README:

cameraView.setFacing(CameraKit.Constants.FACING_FRONT);

mbernr avatar Apr 18 '17 12:04 mbernr

@dphans Take a look at all public methods inside CameraView object.

luongvo avatar Apr 19 '17 01:04 luongvo

@mbernr @luongvo I see. But when call startCamera method after setFacing, camera facing not correct update. I've fixed temporary by this way (set default in layout file):

  • In layout file: add 2 CameraView elements, one CameraView setup it default front-facing, one for back-facing.
  • In activity: get user settings and select one in 2 CameraView to show on screen.

I think this is temporary fixed for company project, but can close this issue. Many thanks.

dphans avatar Apr 25 '17 12:04 dphans