How to capture images in background using Camera2 api?

六月ゝ 毕业季﹏ 提交于 2019-12-06 16:35:14

Yes, but as of Android 5.0 Marshmallow, you may be disconnected from the camera at any time, if a foreground app wants to use it instead.

And before Android M, using the camera from the background is not recommended, since you'll block any foreground app from using it (the app will just get an error trying to open the camera, and generally will crash as a result).

Otherwise, the camera API works the same. You'll need to run the camera for a few seconds before taking the final picture to ensure metering and focus are generally good, though exactly what you need would depend highly on the details of your use case.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!