docs: update example, xposed-using

This commit is contained in:
2023-10-05 00:37:35 +08:00
parent c7decb4119
commit 4e0f88dbad
4 changed files with 23 additions and 5 deletions

View File

@@ -6,7 +6,7 @@
> As an Xposed Module, `YukiHookAPI` provides an automatic builder.
You need to integrate the latest version of the `com.highcapable.yukihookapi:ksp-xposed` dependency in your `build.gradle`.
You need to integrate the latest version of the `com.highcapable.yukihookapi:ksp-xposed` dependency in your build script.
## Custom Automatic Builder
@@ -19,6 +19,7 @@ annotation class InjectYukiHookWithXposed(
val sourcePath: String,
val modulePackageName: String,
val entryClassName: String,
val isUsingXposedModuleStatus: Boolean,
val isUsingResourcesHook: Boolean
)
```
@@ -186,9 +187,17 @@ The **entryClassName** you define must not be the same as the class name in **xp
:::
#### isUsingXposedModuleStatus Parameter
`isUsingXposedModuleStatus` determines whether the automatic builder generates relevant code for status functions such as Xposed Module activation, this feature is enabled by default.
After generation, you will be able to use the related functions of `YukiHookAPI.Status` in the Module App's process.
If you do not want to generate related code, you can manually turn off this feature, which will only take effect for the Module App's process.
#### isUsingResourcesHook Parameter
`isUsingResourcesHook` determines whether the automatic builder generates relevant code for the Resources Hook, This feature is not enabled by default.
`isUsingResourcesHook` determines whether the automatic builder generates relevant code for the Resources Hook, this feature is not enabled by default.
By default the generated entry class will look like this.

View File

@@ -676,7 +676,7 @@ For more functions, please refer to [YukiHookAPI.Status.Executor](../api/public/
**YukiHookAPI** after **1.0.91** version modifies the logical judgment method of obtaining the status of the Xposed Module, and now you can use this API in the Module App and Host App at the same time;
Need to make sure **YukiHookAPI.Configs.isEnableHookModuleStatus** is enabled;
Need to make sure **InjectYukiHookWithXposed.isUsingXposedModuleStatus** is enabled;
**YukiHookAPI** only connects to the known acquisition methods.