参考文档:UIExtensionContext
跳转系统通用能力
import common from '@ohos.app.ability.common';
@Entry
@Component
struct test6{
build(){
Button("跳转到定位页面").onClick(()=>{
let context = getContext(this) as common.UIAbilityContext;
context.startAbility({
bundleName: 'com.huawei.hmos.settings',
abilityName: 'com.huawei.hmos.settings.MainAbility',
uri: 'location_manager_settings',
parameters: {
pushParams: 'com.xxx.xxxx'
}
});
})
}
}
跳转wifi设置
let want = {
bundleName: 'com.huawei.hmos.settings',
abilityName: 'com.huawei.hmos.settings.WifiSettingsAbility',
action: 'action.settings.wifi',
};
let want: Want = {
bundleName: 'com.huawei.hmos.settings',
abilityName: 'com.huawei.hmos.settings.WifiSettingsAbility',
uri: 'wifi_entry',
};
隐私与安全-位置信息
let want: Want = {
bundleName: 'com.huawei.hmos.settings',
abilityName: 'com.huawei.hmos.settings.MainAbility',
uri: 'location_manager_settings',
};
应用和元服务
let want = {
bundleName: 'com.huawei.hmos.settings',
abilityName: 'com.huawei.hmos.settings.MainAbility',
uri: 'application_settings',
};
应用权限设置
let want: Want = {
bundleName: 'com.huawei.hmos.settings',
abilityName: 'com.huawei.hmos.settings.WifiSettingsAbility',
uri: 'application_info_entry',
};