import{_ as o,r as l,o as p,c,b as s,d as e,e as i,a as n}from"./app-BpUB8-Q8.js";const t={},d=n(`
Notice
Due to maintenance costs, the YukiHookAPI
will no longer update this document from version 1.3.0
and switch to the API document automatically generated by the Dokka plugin in version 2.0.0
.
Notice
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the Chrome Translation Plugin to translate entire pages for reference.
open class ModuleApplication: Application()
Change Records
v1.0.77
added
Function Illustrate
这是对使用
YukiHookAPI
Xposed 模块实现中的一个扩展功能。
在你的 Xposed 模块的 Application
中继承此类。
或在 AndroidManifest.xml
的 application
标签中指定此类。
目前可实现功能如下
`,11),r=n("全局共享模块中静态的 appContext
在模块与宿主中装载 YukiHookAPI.Config
以确保 YukiHookAPI.Configs.debugTag
不需要重复定义
在模块与宿主中使用 YukiHookDataChannel
进行通讯
Function Example
将此类继承到你的自定义 Application
上。
The following example
package com.demo
class MyApplication: ModuleApplication() {
override fun onCreate() {
super.onCreate()
}
}
在 AndroidManifest.xml
的 application
标签中指定自定义的 Application
。
The following example
<application
android:name="com.demo.MyApplication"
...>
如果你不需要自定义 Application
可以直接将 ModuleApplication
设置到 AndroidManifest.xml
的 application
标签中。
The following example
<application
android:name="com.highcapable.yukihookapi.hook.xposed.application.ModuleApplication"
...>
val appContext: ModuleApplication
Change Records
v1.0.77
added
Function Illustrate
`,16);function y(h,v){const a=l("ExternalLinkIcon");return p(),c("div",null,[d,s("ul",null,[r,s("li",null,[s("p",null,[e("在模块中使用系统隐藏 API,核心技术引用了开源项目 "),s("a",u,[e("FreeReflection"),i(a)])])]),A]),m])}const g=o(t,[["render",y],["__file","ModuleApplication.html.vue"]]);export{g as default};获取全局静态
Application
实例。