Android的湿度传感器清单 [英] Android humidity sensor manifest

查看:223
本文介绍了Android的湿度传感器清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用的用途,功能,在Android中,以我的应用程序限制为只能是Play商店与湿度传感器的设备可见的,但我不能找到developer.android.com的分隔,这将是该传感器

我知道,加速度计是这样的:

 <使用特征
    机器人:名字=android.hardware.sensor.accelerometer
    机器人:要求=真/>


解决方案

有没有办法做到这一点使用<使用特征>

这里约<使用特征方式>

我知道另一种解决方案:当应用程序的用户反过来,你得到的传感器的列表,如果没有hydrometr,你敬酒显示:


  

你不能使用该应用程序,因为您的设备还没有得到
  所需的传感器


I want to use the uses-feature in android to limit my app to only be visible on the play store to devices with a humidity sensor, but I cant find on developer.android.com what the delimited would be for that sensor.

I know that for accelerometer is like this:

<uses-feature
    android:name="android.hardware.sensor.accelerometer"
    android:required="true" />       

解决方案

There is no way to do that using <uses-feature>

Read here about <uses-feature>.

I know alternative solution : when user turn on application, you're getting a list of sensors and if there is not hydrometr, you're showing toast :

"You cannot use that application, because your device hasn't got required sensor"

这篇关于Android的湿度传感器清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆