HarmonyOS app中前往系统设置开启通知,只能到通知和状态栏那一级,到不了对应app的通知管理页面?

如题:HarmonyOS app中前往系统设置开启通知,只能到通知和状态栏那一级,到不了对应app的通知管理页面?

阅读 498
1 个回答

可以参考下述demo:

Button("打开通知设置").onClick(() => {
  let context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext;
  let want: Want = {
    bundleName: 'com.huawei.hmos.settings', //设置应用bundleName
    abilityName: 'com.huawei.hmos.settings.MainAbility', //设置应用abilityName
    uri: "systemui_notification_settings", //通知管理页面
    parameters: {
      pushParams: {
        bundleName: context.abilityInfo.bundleName//拉起方应用包名
      }
    }
  }
  context.startAbility(want)
})
logo
HarmonyOS
子站问答
访问
宣传栏