mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 01:35:17 +08:00
Update xposed-channel documentation
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -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(...)**。
|
||||
|
||||
|
Reference in New Issue
Block a user