Android 为什么可以';我不能使用传感器类型的倾斜检测器吗?
在我的应用程序中,我需要检测用户何时倾斜设备(向左或向右) 在Android源代码中,有一个: 但是它有一个Android 为什么可以';我不能使用传感器类型的倾斜检测器吗?,android,android-sensors,Android,Android Sensors,在我的应用程序中,我需要检测用户何时倾斜设备(向左或向右) 在Android源代码中,有一个: 但是它有一个@hide注释,所以我不能使用它。这句话的意思是: 顺便说一下,Sensor.TYPE_TILT_DETECTOR[…]隐藏在SDK中,因为它们仅用于系统UI 这真的很烦人,因为它似乎正是我需要的功能。我们为什么不能用它?我真的要重新发明轮子吗 /** * A sensor of this type generates an event each time a tilt
@hide
注释,所以我不能使用它。这句话的意思是:
顺便说一下,Sensor.TYPE_TILT_DETECTOR[…]隐藏在SDK中,因为它们仅用于系统UI
这真的很烦人,因为它似乎正是我需要的功能。我们为什么不能用它?我真的要重新发明轮子吗
/**
* A sensor of this type generates an event each time a tilt event is detected. A tilt event
* is generated if the direction of the 2-seconds window average gravity changed by at
* least 35 degrees since the activation of the sensor. It is a wake up sensor.
*
* @hide
* @see #isWakeUpSensor()
*/
public static final int TYPE_TILT_DETECTOR = 22;