• Lv0
    粉丝0

积分82 / 贡献0

提问30答案被采纳0文章0

JS/ArkTS跳转到其他应用时报错“\[c4d4d3492eb8531, 0, 0\] ContextDeal::startAbility fetchAbilities failed”

Summer 显示全部楼层 发表于 2023-9-22 14:20:40

【问题描述】
JS/ArkTS跳转时, startAbility报错,错误信息“\[c4d4d3492eb8531, 0, 0\] ContextDeal::startAbility fetchAbilities failed”

【运行环境】
硬件:rk3568;  ROM: 3.2  Beta5;  API 9


您尚未登录,无法参与评论,登录后可以:
参与开源共建问题交流
认同或收藏高质量问答
获取积分成为开源共建先驱

精彩评论1

马迪

沙发 发表于 2023-9-27 09:03:08

这个还是FA模型下的问题。 一般用startAbility,实现如下:

import featureAbility from '@ohos.ability.featureAbility'
function onStartRemoteAbility() {
console.info('onStartRemoteAbility begin');
let params;
let wantValue = {
    bundleName: 'ohos.samples.etsDemo',
    abilityName: 'ohos.samples.etsDemo.RemoteAbility',
    deviceId: getRemoteDeviceId(),
    parameters: params
};
console.info('onStartRemoteAbility want=' + JSON.stringify(wantValue));
featureAbility.startAbility({
    want: wantValue
}).then((data) => {
console.info('onStartRemoteAbility finished, ' + JSON.stringify(data));
});
console.info('onStartRemoteAbility end');
}

参考链接

可参考启动本地PageAbility

Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

返回顶部