HarmonyOS 如何跳转设置的通知管理页?

如题:HarmonyOS 如何跳转设置的通知管理页?

阅读 535
1 个回答

拉起设置常用页面参考:

https://developer.huawei.com/consumer/cn/doc/harmonyos-faqs-V5/faqs-ability-kit-V5\#section858910165268

代码示例:

1)拉起应用设置详情页

let context = getContext(this) as common.UIAbilityContext;
let want: Want = {
  bundleName: 'com.huawei.hmos.settings',
  abilityName: 'com.huawei.hmos.settings.MainAbility',
  uri: 'application_info_entry',
  parameters: {
    pushParams: context.applicationInfo.name // 应用包名
  }
};
context.startAbility(want)

2)拉起通知管理页:

let context = getContext(this) as common.UIAbilityContext;
let want: Want = {
  bundleName: 'com.huawei.hmos.settings',
  abilityName: 'com.huawei.hmos.settings.MainAbility',
  uri: 'systemui_notification_settings',
  parameters: {
    pushParams: context.applicationInfo.name // 应用包名
  }
};
context.startAbility(want)
logo
HarmonyOS
子站问答
访问
宣传栏