harmony 鸿蒙Resource Scheduler Subsystem Changelog

  • 2023-06-24
  • 浏览 (213)

Resource Scheduler Subsystem Changelog

cl.resourceschedule.reminderAgent.1

The reminder agent allows you to customize buttons for system applications. Clicking a custom button will redirect you to the specified application page.

Change Impact

For system applications developed based on OpenHarmony 4.0.7.1 and later SDK versions, you can set custom buttons for reminders.

Key API/Component Changes

|Module|Class|Method/Attribute/Enum/Constant|Change Type| | –|–|–|–| |reminderAgentManager|ActionButtonType|ACTION_BUTTON_TYPE_CUSTOM = 2|Added| |reminderAgentManager|ActionButton|wantAgent?: WantAgent|Added| |reminderAgentManager|WantAgent|uri?: string|Added| |reminderAgentManager|ReminderRequest |actionButton?: [ActionButton?, ActionButton?, ActionButton?]|Changed|

Adaptation Guide

import reminderAgentManager from '@ohos.reminderAgentManager';

let targetReminderAgent: reminderAgentManager.ReminderRequestAlarm = {
    reminderType: reminderAgentManager.ReminderType.REMINDER_TYPE_ALARM, // The reminder type is alarm clock.
    ...
    actionButton: [
        {
            title: 'Remind later',
            type: reminderAgentManager.ActionButtonType.ACTION_BUTTON_TYPE_SNOOZE
        },
        {
            title: 'Close',
            type: reminderAgentManager.ActionButtonType.ACTION_BUTTON_TYPE_CLOSE
        },
        {
            title: 'Custom',
            type: reminderAgentManager.ActionButtonType.ACTION_BUTTON_TYPE_CUSTOM,
            wantAgent: {
                pkgName: "com.example.myapplication",
                abilityName: "EntryAbility",
            }
        },
    ]
}

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Readme

harmony 鸿蒙Ability Framework Changelog

harmony 鸿蒙Multi-language Runtime Subsystem Changelog

harmony 鸿蒙ArkUI Subsystem Changelog

harmony 鸿蒙Bundle Management Subsystem Changelog

harmony 鸿蒙Common Capability Changelog

harmony 鸿蒙Globalization Subsystem Changelog

harmony 鸿蒙HUKS Changelog

harmony 鸿蒙Web Subsystem Changelog

0  赞