过时的android.hardware.camera.autofocus的替代过滤器是什么?
问题描述:
我知道过滤器“android.hardware.camera.autofocus”已从sdk 21
弃用。过时的android.hardware.camera.autofocus的替代过滤器是什么?
我也知道我可以在应用程序运行时以编程方式检查它。
但问题是,是不是有一个替代的过滤器,我必须以编程方式吗?
如果没有,可以解释不使用过滤器进行工作的原因吗?
在此先感谢。
答
我知道过滤器 “android.hardware.camera.autofocus” 是从SDK 21.
它没有被弃用过时,至少根据the documentation和the documentation。
是不存在替代性过滤器
可以使用<uses-feature>
为android.hardware.camera.autofocus
,因为它不会出现被弃用。
我明白了。 但作为这个文档显示: https://developer.android.com/reference/android/hardware/Camera.html 类android.hardware.camera在SDK 21 的Android工作室本身自动弃用建议也使用camera2。 所以我认为会有一个替代方案。 – madisan
@madisan:“android.hardware.camera类在sdk 21中不推荐使用” - 这是一个Java类('android.hardware.Camera'),而不是'uses-feature'值。 “Android Studio本身也自动推荐使用camera2” - 其中'camera2'没有'uses-feature'值。 – CommonsWare