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.

ModuleApplication - class

open class ModuleApplication: Application()

Change Records

v1.0.77 added

Function Illustrate

这是对使用 YukiHookAPI Xposed 模块实现中的一个扩展功能。

在你的 Xposed 模块的 Application 中继承此类。

或在 AndroidManifest.xmlapplication 标签中指定此类。

目前可实现功能如下

`,11),r=n("
  • 全局共享模块中静态的 appContext

  • 在模块与宿主中装载 YukiHookAPI.Config 以确保 YukiHookAPI.Configs.debugTag 不需要重复定义

  • 在模块与宿主中使用 YukiHookDataChannel 进行通讯

  • ",3),u={href:"https://github.com/tiann/FreeReflection",target:"_blank",rel:"noopener noreferrer"},A=s("li",null,[s("p",null,[e("在模块中使用 "),s("code",null,"YukiHookAPI.Status.isTaiChiModuleActive"),e(" 判断太极、无极激活状态")])],-1),m=n(`

    Function Example

    将此类继承到你的自定义 Application 上。

    The following example

    package com.demo
    
    class MyApplication: ModuleApplication() {
    
        override fun onCreate() {
            super.onCreate()
        }
    }
    

    AndroidManifest.xmlapplication 标签中指定自定义的 Application

    The following example

    <application
        android:name="com.demo.MyApplication"
        ...>
    

    如果你不需要自定义 Application 可以直接将 ModuleApplication 设置到 AndroidManifest.xmlapplication 标签中。

    The following example

    <application
        android:name="com.highcapable.yukihookapi.hook.xposed.application.ModuleApplication"
        ...>
    

    appContext - field

    val appContext: ModuleApplication
    

    Change Records

    v1.0.77 added

    Function Illustrate

    获取全局静态 Application 实例。

    `,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};