Intent does not set the camera parameters

后端 未结 2 556
生来不讨喜
生来不讨喜 2020-11-27 23:18

I am opening camera app as external intent from my applications. I am using following code to invoke the camera and following are my conditions:

  1. It should open
2条回答
  •  我在风中等你
    2020-11-27 23:34

    intent.putExtra("android.intent.extras.CAMERA_FACING", android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT);
    

    this is an intent to start capture with the front camera instead of the default rear camera.

    this works as it is used in this popular cordova plugin in this link at line 145 : https://github.com/EddyVerbruggen/VideoCapturePlus-PhoneGap-Plugin/blob/master/src/android/nl/xservices/plugins/videocaptureplus/VideoCapturePlus.java

    hope this helps anyone facing the same problem.

    also do you know if you can set an intent to disable the camera controls(filters,switch between cameras..etc) , so that they doesn't show ?

提交回复
热议问题