public class SensorUtils extends Object
SystemCapability.Sensors#SENSOR| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static int |
parseSensorCategory(int sensorId) |
Parses the category of a sensor based on the sensor ID.
|
static int |
parseSensorIndex(int sensorId) |
Parses the index of a sensor based on the sensor ID.
|
static int |
parseSensorType(int sensorId) |
Parses the type of a sensor based on the sensor ID.
|
public static int parseSensorCategory(int sensorId)
sensorId - Indicates the ID of the sensor.public static int parseSensorType(int sensorId)
sensorId - Indicates the ID of the sensor.public static int parseSensorIndex(int sensorId)
If multiple sensors of a specific type are available, this method is used to parse the index of the current sensor.
sensorId - Indicates the ID of the sensor.