[英]Android SurfaceView or Camera2 API for camera preview
I am trying to implement the camera preview function into my app. 我正在尝试在我的应用程序中实现相机预览功能。 After a lot of research I found that the best solution is the Camera2 API, but, it isn't supported on most phones.
经过大量研究,我发现最好的解决方案是Camera2 API,但是大多数手机不支持该解决方案。 Is there a better solution to do this?
有更好的解决方案吗? For example, I read a lot about using a SurfaceView to load the camera preview on.
例如,我读了很多有关使用SurfaceView加载相机预览的内容。
I simply followed the Android docs to use the camera API. 我只是遵循Android文档来使用相机API。 Camera2 API is fairly new and I want to make sure all users can have it.
Camera2 API相当新,我想确保所有用户都可以使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.