harmony(鸿蒙)资源调度子系统JS API变更

2022-08-09 浏览 (807)

资源调度子系统JS API变更

OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,资源调度子系统的API变更如下:

接口变更

模块名类名方法/属性/枚举/常量变更类型
ohos.reminderAgentLocalDateTimesecond?: number;新增
ohos.reminderAgentLocalDateTimeminute: number;新增
ohos.reminderAgentLocalDateTimehour: number;新增
ohos.reminderAgentLocalDateTimeday: number;新增
ohos.reminderAgentLocalDateTimemonth: number;新增
ohos.reminderAgentLocalDateTimeyear: number;新增
ohos.reminderAgentReminderRequestTimertriggerTimeInSeconds: number;新增
ohos.reminderAgentReminderRequestAlarmdaysOfWeek?: Array<number>;新增
ohos.reminderAgentReminderRequestAlarmminute: number;新增
ohos.reminderAgentReminderRequestAlarmhour: number;新增
ohos.reminderAgentReminderRequestCalendarrepeatDays?: Array<number>;新增
ohos.reminderAgentReminderRequestCalendarrepeatMonths?: Array<number>;新增
ohos.reminderAgentReminderRequestCalendardateTime: LocalDateTime;新增
ohos.reminderAgentReminderRequestslotType?: notification.SlotType;新增
ohos.reminderAgentReminderRequestnotificationId?: number;新增
ohos.reminderAgentReminderRequestsnoozeContent?: string;新增
ohos.reminderAgentReminderRequestexpiredContent?: string;新增
ohos.reminderAgentReminderRequestcontent?: string;新增
ohos.reminderAgentReminderRequesttitle?: string;新增
ohos.reminderAgentReminderRequesttimeInterval?: number;新增
ohos.reminderAgentReminderRequestsnoozeTimes?: number;新增
ohos.reminderAgentReminderRequestringDuration?: number;新增
ohos.reminderAgentReminderRequestmaxScreenWantAgent?: MaxScreenWantAgent;新增
ohos.reminderAgentReminderRequestwantAgent?: WantAgent;新增
ohos.reminderAgentReminderRequestactionButton?: [ActionButton?, ActionButton?];新增
ohos.reminderAgentReminderRequestreminderType: ReminderType;新增
ohos.reminderAgentMaxScreenWantAgentabilityName: string;新增
ohos.reminderAgentMaxScreenWantAgentpkgName: string;新增
ohos.reminderAgentWantAgentabilityName: string;新增
ohos.reminderAgentWantAgentpkgName: string;新增
ohos.reminderAgentActionButtontype: ActionButtonType;新增
ohos.reminderAgentActionButtontitle: string;新增
ohos.reminderAgentReminderTypeREMINDER_TYPE_ALARM = 2新增
ohos.reminderAgentReminderTypeREMINDER_TYPE_CALENDAR = 1新增
ohos.reminderAgentReminderTypeREMINDER_TYPE_TIMER = 0新增
ohos.reminderAgentActionButtonTypeACTION_BUTTON_TYPE_SNOOZE = 1新增
ohos.reminderAgentActionButtonTypeACTION_BUTTON_TYPE_CLOSE = 0新增
ohos.reminderAgentreminderAgentremoveNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback<void>): void;
removeNotificationSlot(slotType: notification.SlotType): Promise<void>;
新增
ohos.reminderAgentreminderAgentaddNotificationSlot(slot: NotificationSlot, callback: AsyncCallback<void>): void;
addNotificationSlot(slot: NotificationSlot): Promise<void>;
新增
ohos.reminderAgentreminderAgentcancelAllReminders(callback: AsyncCallback<void>): void;
cancelAllReminders(): Promise<void>;
新增
ohos.reminderAgentreminderAgentgetValidReminders(callback: AsyncCallback<Array<ReminderRequest>>): void;
getValidReminders(): Promise<Array<ReminderRequest>>;
新增
ohos.reminderAgentreminderAgentcancelReminder(reminderId: number, callback: AsyncCallback<void>): void;
cancelReminder(reminderId: number): Promise<void>;
新增
ohos.reminderAgentreminderAgentpublishReminder(reminderReq: ReminderRequest, callback: AsyncCallback<number>): void;
publishReminder(reminderReq: ReminderRequest): Promise<number>;
新增
ohos.bundleStatebundleStatequeryCurrentBundleActiveStates(begin: number, end: number, callback: AsyncCallback<Array<BundleActiveState>>): void;
queryCurrentBundleActiveStates(begin: number, end: number): Promise<Array<BundleActiveState>>;
新增
ohos.bundleStateIntervalTypeBY_ANNUALLY = 4新增
ohos.bundleStateIntervalTypeBY_MONTHLY = 3新增
ohos.bundleStateIntervalTypeBY_WEEKLY = 2新增
ohos.bundleStateIntervalTypeBY_DAILY = 1新增
ohos.bundleStateIntervalTypeBY_OPTIMIZED = 0新增
ohos.bundleStateBundleActiveInfoResponse[key: string]: BundleStateInfo;新增
ohos.bundleStatebundleStatequeryAppUsagePriorityGroup(callback: AsyncCallback<number>): void;
queryAppUsagePriorityGroup(): Promise<number>;
新增
ohos.bundleStatebundleStateisIdleState(bundleName: string, callback: AsyncCallback<boolean>): void;
isIdleState(bundleName: string): Promise<boolean>;
新增
ohos.bundleStateBundleActiveStatestateType?: number;新增
ohos.bundleStateBundleActiveStatestateOccurredTime?: number;新增
ohos.bundleStateBundleActiveStatenameOfClass?: string;新增
ohos.bundleStateBundleActiveStateindexOfLink?: string;新增
ohos.bundleStateBundleActiveStatebundleName?: string;新增
ohos.bundleStateBundleActiveStateappUsagePriorityGroup?: number;新增
ohos.bundleStateBundleStateInfomerge(toMerge: BundleStateInfo): void;新增
ohos.bundleStateBundleStateInfoinfosEndTime?: number;新增
ohos.bundleStateBundleStateInfoinfosBeginTime?: number;新增
ohos.bundleStateBundleStateInfofgAbilityPrevAccessTime?: number;新增
ohos.bundleStateBundleStateInfofgAbilityAccessTotalTime?: number;新增
ohos.bundleStateBundleStateInfobundleName?: string;新增
ohos.bundleStateBundleStateInfoabilitySeenTotalTime?: number;新增
ohos.bundleStateBundleStateInfoabilityPrevSeenTime?: number;新增
ohos.bundleStateBundleStateInfoabilityPrevAccessTime?: number;新增
ohos.bundleStateBundleStateInfoabilityInFgTotalTime?: number;新增
ohos.bundleStateBundleStateInfoid: number;新增
ohos.backgroundTaskManagerBackgroundModeTASK_KEEPING = 9新增
ohos.backgroundTaskManagerBackgroundModeMULTI_DEVICE_CONNECTION = 6新增
ohos.backgroundTaskManagerBackgroundModeBLUETOOTH_INTERACTION = 5新增
ohos.backgroundTaskManagerBackgroundModeLOCATION = 4新增
ohos.backgroundTaskManagerBackgroundModeAUDIO_RECORDING = 3新增
ohos.backgroundTaskManagerBackgroundModeAUDIO_PLAYBACK = 2新增
ohos.backgroundTaskManagerBackgroundModeDATA_TRANSFER = 1新增
ohos.backgroundTaskManagerbackgroundTaskManagerstopBackgroundRunning(context: Context, callback: AsyncCallback<void>): void;
stopBackgroundRunning(context: Context): Promise<void>;
新增
ohos.backgroundTaskManagerbackgroundTaskManagerstartBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent, callback: AsyncCallback<void>): void;
startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent): Promise<void>;
新增
ohos.backgroundTaskManagerbackgroundTaskManagerrequestSuspendDelay(reason: string, callback: Callback<void>): DelaySuspendInfo;新增
ohos.backgroundTaskManagerbackgroundTaskManagergetRemainingDelayTime(requestId: number, callback: AsyncCallback<number>): void;
getRemainingDelayTime(requestId: number): Promise<number>;
新增
ohos.backgroundTaskManagerbackgroundTaskManagercancelSuspendDelay(requestId: number): void;新增
ohos.backgroundTaskManagerDelaySuspendInfoactualDelayTime: number;新增
ohos.backgroundTaskManagerDelaySuspendInforequestId: number;新增

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)3.1 release相对于3.1 beta变更详细说明

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

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

harmony(鸿蒙)无障碍子系统JS API变更

harmony(鸿蒙)帐号子系统JS API变更

harmony(鸿蒙)ArkUI子系统JS API变更

harmony(鸿蒙)电源服务子系统JS API变更

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

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

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