Update xposed-channel documentation

This commit is contained in:
2023-04-08 03:19:05 +08:00
parent 05a7059eeb
commit 8120206f4d
2 changed files with 3 additions and 3 deletions

View File

@@ -192,7 +192,7 @@ A callback event with the same **key** will only call back the callback event re
The same **key** registers **dataChannel** in the same **Activity** but different **Fragment**, they will still be called back in the current **Activity** at the same time.
In a Module App, you can only use **Context** of **Activity** to register **dataChannel**, you cannot use **dataChannel** in **Application** and **Service**.
In a Module App, you can use **dataChannel** in **Activity**, **Application** and **Service**, when used in places other than **Activity**, each callback event will instant callback, at which point you can use **ChannelPriority** to manage.
If you want to use **dataChannel** in **Fragment**, use **activity?.dataChannel(...)**.
@@ -259,7 +259,7 @@ class FragmentB : BaseFragment() {
## Security Instructions
In the Module environment, you can only receive the communication data sent by <u>**the Host App of the specified package name**</u> and can only send to <u>**the Host App of the specified package name**</u>, except for System Framework.
In the module environment, you can only receive the communication data sent by <u>**the Host App of the specified package name**</u> and can only send to <u>**the Host App of the specified package name**</u>, except for System Framework.
::: danger

View File

@@ -186,7 +186,7 @@ class OtherActivity : AppCompatActivity() {
相同的 **key** 在同一个 **Activity** 不同的 **Fragment** 中注册 **dataChannel**,它们依然会在当前 **Activity** 中同时被回调。
在模块中,你只能使用 **Activity****Context** 注册 **dataChannel**你不能**Application** 以及 **Service** 地方使用 **dataChannel**
在模块中,你可以在 **Activity**、**Application** 以及 **Service** 等地方使用 **dataChannel**,在 **Activity** 以外的地方使用时每个回调事件都会即时回调,此时你可以使用 **ChannelPriority** 进行管理
若要在 **Fragment** 中使用 **dataChannel**,请使用 **activity?.dataChannel(...)**