OpenHarmony开发者论坛

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

作者: Summer    时间: 2023-9-22 14:20
标题: JS/ArkTS跳转到其他应用时报错“\[c4d4d3492eb8531, 0, 0\] ContextDeal::startAbility fetchAbilities failed”

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

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



作者: 马迪    时间: 2023-9-27 09:03
[md]这个还是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](https://gitee.com/openharmony/do ... ocal-pageability.md)。

[/md]




欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/) Powered by Discuz! X3.5