中国优质的IT技术网站
专业IT技术创作平台
IT职业在线教育平台
如何跳转设置—应用详情页
微信扫码分享
// 拉起设置应用的应用信息页面(显示) function startSettingsAppInfoAbilityExplicit(): void { let context = getContext(this) as common.UIAbilityContext; let want = { bundleName: ‘com.huawei.hmos.settings’, abilityName: ‘com.huawei.hmos.settings.AppInfoAbility’, action: ‘action.settings.app.info’, parameters: { // 待跳转的应用的包名 settingsParamBundleName: ‘com.example.navigatesetting’ } }; context.startAbility(want) .then(() => { // … }) .catch((err) => { console.error(Failed to startAbility. Code: ${err.code}, message: ${err.message}); }); }