未验证 提交 f25f4c80 编写于 作者: Q ql 提交者: Gitee

update zh-cn/application-dev/ability/stage-ability.md.

Signed-off-by: Nql <qianli16@huawei.com>
上级 ab7d320a
......@@ -164,7 +164,6 @@ context.startAbility(want, options).then((data) => {
```
### 跨设备启动Ability(当前仅对系统应用开放)
备注:由于DeviceManager getTrustedDeviceListSync接口仅对系统应用开放,当前跨设备启动Ability仅支持系统应用
跨设备场景下,需指定对端设备deviceId,具体示例代码如下:
```ts
let context = this.context
......@@ -179,7 +178,7 @@ context.startAbility(want).then((data) => {
console.error("Failed to start remote ability with error: "+ JSON.stringify(error))
})
```
从DeviceManager获取指定设备的deviceId。具体示例代码如下:
从DeviceManager获取指定设备的deviceId,getTrustedDeviceListSync接口仅对系统应用开放。具体示例代码如下:
```ts
import deviceManager from '@ohos.distributedHardware.deviceManager';
function getRemoteDeviceId() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册