openharmony 鸿蒙 js-apidiff-battery

2022-12-22 浏览 (778)

电源服务子系统JS API变更

OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,电源服务子系统的API变更如下:

接口变更

模块名类名方法/属性/枚举/常量变更类型
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_TECHNOLOGY新增
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_PRESENT新增
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_CHARGE_COUNTER新增
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_CHARGE_STATE新增
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_MAX_VOLTAGE新增
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_MAX_CURRENT新增
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_PLUGGED_TYPE新增
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_HEALTH_STATE新增
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_TEMPERATURE新增
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_VOLTAGE新增
ohos.batteryinfoCommonEventBatteryChangedCodeEXTRA_SOC = 0新增
ohos.batteryinfoBatteryCapacityLevelLEVEL_CRITICAL新增
ohos.batteryinfoBatteryCapacityLevelLEVEL_LOW新增
ohos.batteryinfoBatteryCapacityLevelLEVEL_NORMAL新增
ohos.batteryinfoBatteryCapacityLevelLEVEL_HIGH新增
ohos.batteryinfoBatteryCapacityLevelLEVEL_FULL新增
ohos.batteryinfoBatteryCapacityLevelLEVEL_NONE新增
ohos.batteryinfobatteryInfoconst remainingEnergy: number;新增
ohos.batteryinfobatteryInfoconst nowCurrent: number;新增
ohos.batteryinfobatteryInfoconst totalEnergy: number;新增
ohos.batteryinfobatteryInfoconst estimatedRemainingChargeTime: number;新增
ohos.batteryinfobatteryInfoconst batteryCapacityLevel: BatteryCapacityLevel;新增
ohos.powerDevicePowerModeMODE_EXTREME_POWER_SAVE新增
ohos.powerDevicePowerModeMODE_PERFORMANCE新增
ohos.powerDevicePowerModeMODE_POWER_SAVE新增
ohos.powerDevicePowerModeMODE_NORMAL = 600新增
ohos.powerpowersetPowerMode(mode: DevicePowerMode, callback: AsyncCallback<void>): void;
setPowerMode(mode: DevicePowerMode): Promise<void>;
新增
ohos.powerpowergetPowerMode(callback: AsyncCallback<DevicePowerMode>): void;
getPowerMode(): Promise<DevicePowerMode>;
新增
ohos.powerpowersuspendDevice(): void;新增
ohos.powerpowerwakeupDevice(detail: string): void;新增

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Readme

harmony 鸿蒙元能力子系统JS API变更

harmony 鸿蒙ArkUI子系统JS API变更

harmony 鸿蒙包管理子系统JS API变更

harmony 鸿蒙基础通信子系统JS API变更

harmony 鸿蒙DFX子系统JS API变更

harmony 鸿蒙分布式数据管理子系统JS API变更

harmony 鸿蒙事件通知子系统JS API变更

harmony 鸿蒙文件管理子系统JS API变更

harmony 鸿蒙全球化子系统JS API变更

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