android传感器,Android传感器

传感器共有的一些APIsensorManager.registerListener 最后一个参数的值

方法里已经有详细的注释

/** get sensor data as fast as possible */

public static final int SENSOR_DELAY_FASTEST = 0;

/** rate suitable for games */

public static final int SENSOR_DELAY_GAME = 1;

/** rate suitable for the user interface  */

public static final int SENSOR_DELAY_UI = 2;

/** rate (default) suitable for screen orientation changes */

public static final int SENSOR_DELAY_NORMAL = 3;

onAccuracyChanged方法回调的参数/**

* The values returned by this sensor cannot be trusted because the sensor

* had no contact with what it was measuring (for example, the heart rate

* monitor is not in contact with the user).

*/

public static final int SENSOR_STATUS_NO_CONTACT = -1;

/**

* The values returned by this sensor cannot be trusted, calibration is

* needed or the environment doesn't allow readings

*/

public static final int SENSOR_STATUS_UNRELIABLE = 0;

/**

* This sensor is reporting data with low accuracy, calibration with the

* environment is needed

*/

public static final int SENSOR_STATUS_ACCURACY_LOW = 1;

/**

* This sensor is reporting data with an average level of accuracy,

* calibration with the environment may improve the readings

*/

public static final int SENSOR_STATUS_ACCURACY_MEDIUM = 2;

/** This sensor is reporting data with maximum accuracy */

public static final int SENSOR_STATUS_ACCURACY_HIGH = 3;

1.加速度传感器

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值