开源鸿蒙 JS API Changes of the Power Management Subsystem

2022-08-09 浏览 (867)

JS API Changes of the Power Management Subsystem

The table below lists the APIs changes of the power management subsystem in OpenHarmony 3.2 Beta1 over OpenHarmony 3.1 Release.

API Changes

ModuleClassMethod/Attribute/Enumeration/ConstantChange Type
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_TECHNOLOGYAdded
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_PRESENTAdded
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_CHARGE_COUNTERAdded
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_CHARGE_STATEAdded
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_MAX_VOLTAGEAdded
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_MAX_CURRENTAdded
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_PLUGGED_TYPEAdded
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_HEALTH_STATEAdded
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_TEMPERATUREAdded
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_VOLTAGEAdded
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_SOC = 0Added
ohos.batteryinfoBatteryCapacityLevelLEVEL_CRITICALAdded
ohos.batteryinfoBatteryCapacityLevelLEVEL_LOWAdded
ohos.batteryinfoBatteryCapacityLevelLEVEL_NORMALAdded
ohos.batteryinfoBatteryCapacityLevelLEVEL_HIGHAdded
ohos.batteryinfoBatteryCapacityLevelLEVEL_FULLAdded
ohos.batteryinfoBatteryCapacityLevelLEVEL_NONEAdded
ohos.batteryinfobatteryInfoconst remainingEnergy: number;Added
ohos.batteryinfobatteryInfoconst nowCurrent: number;Added
ohos.batteryinfobatteryInfoconst totalEnergy: number;Added
ohos.batteryinfobatteryInfoconst estimatedRemainingChargeTime: number;Added
ohos.batteryinfobatteryInfoconst batteryCapacityLevel: BatteryCapacityLevel;Added
ohos.powerDevicePowerModeMODE_EXTREME_POWER_SAVEAdded
ohos.powerDevicePowerModeMODE_PERFORMANCEAdded
ohos.powerDevicePowerModeMODE_POWER_SAVEAdded
ohos.powerDevicePowerModeMODE_NORMAL = 600Added
ohos.powerpowersetPowerMode(mode: DevicePowerMode, callback: AsyncCallback<void>): void;
setPowerMode(mode: DevicePowerMode): Promise<void>;
Added
ohos.powerpowergetPowerMode(callback: AsyncCallback<DevicePowerMode>): void;
getPowerMode(): Promise<DevicePowerMode>;
Added
ohos.powerpowersuspendDevice(): void;Added
ohos.powerpowerwakeupDevice(detail: string): void;Added

你可能感兴趣的文章

开源鸿蒙 JS API Changes of the Ability Framework

开源鸿蒙 JS API Changes of the ArkUI Development Framework

开源鸿蒙 JS API Changes of the Bundle Management Framework

开源鸿蒙 JS API Changes of the Communication Subsystem

开源鸿蒙 JS API Changes of the DFX Subsystem

开源鸿蒙 JS API Changes of the Distributed Data Management Subsystem

开源鸿蒙 JS API Changes of the Distributed Scheduler Subsystem

开源鸿蒙 JS API Changes of the Common Event and Notification Subsystem

开源鸿蒙 JS API Changes of the File Management Subsystem

开源鸿蒙 JS API Changes of the Globalization Subsystem

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/b91e3a42a6b4404399148f19d4d99dce