harmony(鸿蒙)JS API Changes of the Pan-Sensor Subsystem

  • 2022-10-28
  • 浏览 (462)

JS API Changes of the Pan-Sensor Subsystem

The table below lists the APIs changes of the pan-sensor subsystem in OpenHarmony 3.2 Beta2 over OpenHarmony 3.2 Beta1.

API Changes

Module Class Method/Attribute/Enumeration/Constant Change Type
ohos.sensor SensorType SENSOR_TYPE_ID_HEART_BEAT_RATE = 278 Added
ohos.sensor SensorType SENSOR_TYPE_ID_LINEAR_ACCELEROMETER = 258 Added
ohos.sensor sensor getSensorLists(callback: AsyncCallback<Array<Sensor>>): void;
getSensorLists(): Promise<Array<Sensor>>;
Added
ohos.sensor sensor getSingleSensor(type: SensorType, callback: AsyncCallback<Sensor>): void;
getSingleSensor(type: SensorType): Promise<Sensor>;
Added
ohos.sensor Sensor power:number; Added
ohos.sensor Sensor precision:number; Added
ohos.sensor Sensor maxRange:number; Added
ohos.sensor Sensor sensorTypeId:number; Added
ohos.sensor Sensor hardwareVersion:string; Added
ohos.sensor Sensor firmwareVersion:string; Added
ohos.sensor Sensor venderName:string; Added
ohos.sensor Sensor sensorName:string; Added
ohos.sensor SensorType SENSOR_TYPE_ID_HEART_RATE = 278 Deprecated
ohos.sensor SensorType SENSOR_TYPE_ID_LINEAR_ACCELERATION = 258 Deprecated

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)Adaptation Guide for the Application Sandbox

harmony(鸿蒙)Updates (OpenHarmony 3.2 Beta1 -> OpenHarmony 3.2 Beta2)

harmony(鸿蒙)JS API Changes of the Ability Framework

harmony(鸿蒙)JS API Changes of the Accessibility Subsystem

harmony(鸿蒙)JS API Changes of the Account Subsystem

harmony(鸿蒙)JS API Changes of the ArkUI Development Framework

harmony(鸿蒙)JS API Changes of the Bundle Management Framework

harmony(鸿蒙)JS API Changes of the Communication Subsystem

harmony(鸿蒙)JS API Changes of the Utils Subsystem

0  赞