简体   繁体   English

Android API级别23上的Camera 1软件包

[英]Camera 1 package on Android API level 23

I want to make an Android App using face detection. 我想使用面部检测制作一个Android应用。

I've readed about Camera 1 and Camera 2 APIs. 我已经阅读了Camera 1和Camera 2 API。

Currently I'm using face detection with libraries from Google play services and taking picture with an Intent. 目前,我将人脸检测与Google Play服务中的库一起使用,并使用Intent拍照。 But I would like to ensure that the app will recognize at least 1 face when user take the picture from my app. 但是我想确保当用户从我的应用程序拍摄照片时,该应用程序能够识别出至少一张脸。

I don't want to develop two classes with an interface to support both APIs Android Camera & camera2 API's 我不想使用接口来支持两个API的Android类和camera2 API开发两个类

So, the question is, is the android.hardware.camera supported on Android 6? 因此,问题是,Android 6是否支持android.hardware.camera? I don't want to publish an app that fails on newer devices. 我不想发布在较新设备上失败的应用程序。

Some other idea to solve the deprecation of this API? 解决此API弃用的其他方法?

Another reason to change the library Google play services is becasue doesn't recognize many faces 更改Google Play服务库的另一个原因是因为无法识别很多面孔

Thanks 谢谢

The old camera API still works on devices running Android 6. I haven't heard about any plans to discontinue it, although the new API is becoming the standard. 旧的相机API仍可在运行Android 6的设备上运行。尽管新的API已成为标准,但我还没有任何计划将其停用。 The best way to "solve" the depreciation of the old API is start getting acquainted with the new one. “解决”旧API折旧的最好方法是开始熟悉新API。 It is a daunting task for a beginner, but there is no way around it. 对于初学者来说,这是一项艰巨的任务,但是没有办法解决。 My suggestion is that you start from the official sample applications and learn from there. 我的建议是,您从正式的示例应用程序开始,然后从中学习。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM