未验证 提交 eb5c3bc9 编写于 作者: O openharmony_ci 提交者: Gitee

!9173 翻译完成:8916 fix continuation manager docs Cherry-Pick

Merge pull request !9173 from wusongqing/cherry-pick-1662514357
...@@ -112,33 +112,37 @@ Registers the continuation management service and obtains a token. This API uses ...@@ -112,33 +112,37 @@ Registers the continuation management service and obtains a token. This API uses
``` ```
## continuationManager.on("deviceConnect")<sup>(deprecated)</sup> ## continuationManager.on("deviceConnect")<sup>(deprecated)</sup>
> This API is deprecated since API version 9. You are advised to use [on](#continuationmanagerondeviceconnect) instead.
on(type: "deviceConnect", callback: Callback\<ContinuationResult>): void; on(type: "deviceConnect", callback: Callback\<ContinuationResult>): void;
Subscribes to device connection events. This API uses an asynchronous callback to return the result. Subscribes to device connection events. This API uses an asynchronous callback to return the result.
> This API is deprecated since API version 9. You are advised to use [on](#continuationmanagerondeviceconnect9) instead.
## continuationManager.on("deviceDisconnect")<sup>(deprecated)</sup> ## continuationManager.on("deviceDisconnect")<sup>(deprecated)</sup>
> This API is deprecated since API version 9. You are advised to use [on](#continuationmanagerondevicedisconnect) instead.
on(type: "deviceDisconnect", callback: Callback\<string>): void; on(type: "deviceDisconnect", callback: Callback\<string>): void;
Subscribes to device disconnection events. This API uses an asynchronous callback to return the result. Subscribes to device disconnection events. This API uses an asynchronous callback to return the result.
> This API is deprecated since API version 9. You are advised to use [on](#continuationmanagerondevicedisconnect9) instead.
## continuationManager.off("deviceConnect")<sup>(deprecated)</sup> ## continuationManager.off("deviceConnect")<sup>(deprecated)</sup>
> This API is deprecated since API version 9. You are advised to use [off](#continuationmanageroffdeviceconnect) instead.
off(type: "deviceConnect", callback?: Callback\<ContinuationResult>): void; off(type: "deviceConnect", callback?: Callback\<ContinuationResult>): void;
Unsubscribes from device connection events. This API uses an asynchronous callback to return the result. Unsubscribes from device connection events. This API uses an asynchronous callback to return the result.
> This API is deprecated since API version 9. You are advised to use [off](#continuationmanageroffdeviceconnect9) instead.
## continuationManager.off("deviceDisconnect")<sup>(deprecated)</sup> ## continuationManager.off("deviceDisconnect")<sup>(deprecated)</sup>
> This API is deprecated since API version 9. You are advised to use [off](#continuationmanageroffdevicedisconnect) instead.
off(type: "deviceDisconnect", callback?: Callback\<string>): void; off(type: "deviceDisconnect", callback?: Callback\<string>): void;
Unsubscribes from device disconnection events. This API uses an asynchronous callback to return the result. Unsubscribes from device disconnection events. This API uses an asynchronous callback to return the result.
> This API is deprecated since API version 9. You are advised to use [off](#continuationmanageroffdevicedisconnect9) instead.
## continuationManager.on("deviceConnect")<sup>9+</sup> ## continuationManager.on("deviceConnect")<sup>9+</sup>
on(type: "deviceConnect", token: number, callback: Callback\<Array\<ContinuationResult>>): void; on(type: "deviceConnect", token: number, callback: Callback\<Array\<ContinuationResult>>): void;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
The **ServiceExtensionContext** module, inherited from **ExtensionContext**, provides context for Service Extension abilities. The **ServiceExtensionContext** module, inherited from **ExtensionContext**, provides context for Service Extension abilities.
You can use the APIs of this module to start, terminate, connection, and disconnect abilities. You can use the APIs of this module to start, terminate, connect, and disconnect abilities.
> **NOTE** > **NOTE**
> >
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册