Android using front facing camera to take a picture

后端 未结 2 1630
执笔经年
执笔经年 2021-02-02 04:01

This is my first time using a camera. I\'ve read a lot of examples and also the documentation, so I tried to make my own class to take pictures with the front facing camera.

2条回答
  •  [愿得一人]
    2021-02-02 04:18

    Take a look at this question for info and code how to do it: Taking pictures with camera on Android programmatically

    The code you used here is not wrong, but this one works.

    If you want to take a pic without the user being shown a preview, take a look at this code: https://github.com/aporter/coursera-android/blob/master/Examples/AudioVideoCamera/src/course/examples/AudioVideo/Camera/AudioVideoCameraActivity.java

    You need to get rid of the SurfaceView that shows the user the preview.

提交回复
热议问题