Take Picture without preview Android

前端 未结 3 825
太阳男子
太阳男子 2020-12-06 06:31

I would like to take a picture without any preview. I used this code but I\'m getting an error:

 public void onCreate(Bundle savedInstanceState) {
    super.         


        
3条回答
  •  清歌不尽
    2020-12-06 07:13

    Use this permissions :

     
     
    

    And you can instantiate a Camera object using this

    Camera mycamera = Camera.open();
    

    You can try the method described here is very simple if you are into simplicity:

    http://developer.android.com/training/camera/photobasics.html

提交回复
热议问题