How to capture photo automatically in android phone?

后端 未结 3 1903
刺人心
刺人心 2021-01-07 05:04

I have developed an android application. In that i have used front facing camera functionality. Its working fine but I need to auto capture. i.e. without click shutter butto

3条回答
  •  臣服心动
    2021-01-07 05:53

    Follow the steps outlined in the Android Developer reference pages. There's no requirement to have a 'shutter button'. You can create a dummy SurfaceHolder if you don't want to show the image on the screen, e.g.

    SurfaceView surface = new SurfaceView(context);
    cam.setPreviewDisplay(surface.getHolder());
    

提交回复
热议问题