From 88fc60c38cc851981a176b700b38ce3a7ec8fe00 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Mon, 2 Jan 2023 19:35:21 +0800 Subject: [PATCH] Modify add TaiChi activation status in higher API version description in example documentation --- docs-source/src/en/guide/example.md | 20 ++++++++++++++++++++ docs-source/src/zh-cn/guide/example.md | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/docs-source/src/en/guide/example.md b/docs-source/src/en/guide/example.md index 4d027adf..b69068dd 100644 --- a/docs-source/src/en/guide/example.md +++ b/docs-source/src/en/guide/example.md @@ -666,6 +666,26 @@ For more functions, please refer to [YukiHookAPI.Status](../api/public/com/highc ::: warning +If your Module App's API version is higher than 29 and is running on a system whose target API is 29 or higher, you need to add the following permission statement in **AndroidManifest.xml** to judge the activation status of the Module App in TaiChi and Wuji. + +> The following example + +```xml + + + + + +``` + +There is another solution, you can directly declare the **android.permission.QUERY_ALL_PACKAGES** permission, but it is not recommended and will be warned by code inspection. + +> The following example + +```xml + +``` + If the activation state of TaiChi and Wuji is included in the Module App activation judgment, the **Application** of the Module App must be extends **ModuleApplication** or **ModuleApplication** must be used directly; The API after **1.0.91** has modified the activation logic judgment method, now you can use this API in the Module App and Host App at the same time; diff --git a/docs-source/src/zh-cn/guide/example.md b/docs-source/src/zh-cn/guide/example.md index 86e1cda7..61a5ec24 100644 --- a/docs-source/src/zh-cn/guide/example.md +++ b/docs-source/src/zh-cn/guide/example.md @@ -666,6 +666,26 @@ if(YukiHookAPI.Status.isModuleActive) { ::: warning +如果你的模块 API 版本高于 29 且正在目标 API 为 29 以上的系统中运行,你需要在 **AndroidManifest.xml** 中添加如下权限声明才能正常判断模块在太极、无极中的激活状态。 + +> 示例如下 + +```xml + + + + + +``` + +还有一种方案,你可以直接声明 **android.permission.QUERY_ALL_PACKAGES** 权限,但是不推荐且会被代码检查警告。 + +> 示例如下 + +```xml + +``` + 若模块激活判断中包含太极、无极中的激活状态,就必须将模块的 **Application** 继承于 **ModuleApplication** 或直接使用 **ModuleApplication**; **1.0.91** 版本后的 API 修改了激活逻辑判断方式,现在你可以在模块与 Hook APP (宿主) 中同时使用此 API;