How to take pictures from the camera without preview when my app starts?

前端 未结 5 703
南方客
南方客 2020-12-01 02:00

Now all I want is an app that just takes the picture from the camera upon launching. No layout, no camera preview...nothing, just a simple app icon to launch the app. Once l

5条回答
  •  隐瞒了意图╮
    2020-12-01 02:06

    The camera preview is just a special kind of View in your layout, so if you don't want to display it but still use your existing code without a lot of modifications, there are some tricks you can do.

    For example, in your layout file where you're adding the camera preview SurfaceView, you can just add another view on top of it to block the preview. That way you'll still be able to use your existing code without modifying too much and the camera preview will work just like it did before, but you'll have the effect you're looking for which is not showing the camera preview.

提交回复
热议问题