mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-10-22 11:29:33 +08:00
190 lines
114 KiB
HTML
190 lines
114 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en-US">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||
<meta name="generator" content="VuePress 2.0.0-rc.0">
|
||
<style>
|
||
:root {
|
||
--c-bg: #fff;
|
||
}
|
||
html.dark {
|
||
--c-bg: #22272e;
|
||
}
|
||
html, body {
|
||
background-color: var(--c-bg);
|
||
}
|
||
</style>
|
||
<script>
|
||
const userMode = localStorage.getItem('vuepress-color-scheme');
|
||
const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||
if (userMode === 'dark' || (userMode !== 'light' && systemDarkMode)) {
|
||
document.documentElement.classList.toggle('dark', true);
|
||
}
|
||
</script>
|
||
<link rel="icon" href="/YukiHookAPI/images/logo.png"><title>Host Resource Injection Extension | Yuki Hook API</title><meta name="description" content="An efficient Hook API and Xposed Module solution built in Kotlin">
|
||
<link rel="preload" href="/YukiHookAPI/assets/style-DJZs_E_O.css" as="style"><link rel="stylesheet" href="/YukiHookAPI/assets/style-DJZs_E_O.css">
|
||
<link rel="modulepreload" href="/YukiHookAPI/assets/app-Dh3YGII_.js"><link rel="modulepreload" href="/YukiHookAPI/assets/host-inject.html-CV3pSU3y.js"><link rel="modulepreload" href="/YukiHookAPI/assets/host-inject.html-BRZka0o7.js">
|
||
<link rel="prefetch" href="/YukiHookAPI/assets/index.html-D6YZKtoe.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/index.html-CHgP8geU.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/index.html-Bo0olcew.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/home.html-BWNdBIZw.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/about.html-DDk-q1tu.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/changelog.html-DS_5OIkn.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/contacts.html-BSRuPKMe.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/future.html-L0gip76T.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/api-example.html-pCpzRhE2.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/api-exception.html-Dw1mqBwg.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/api-using.html-zXrI7_0R.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-api-1-2-x.html-CCb8Xv2u.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-api-1-3-x.html-f3TZzPCU.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/r8-proguard.html-Y47fgLwe.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-using.html-CgLVQrdV.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/example.html-CnT6OQuI.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/home.html-Bhz1Th03.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/knowledge.html-BJFcZiJH.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-new-api.html-Bd10LyS9.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/quick-start.html-teZCSUoB.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/supportive.html-bOj3zBC_.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/yukihookapi-projectbuilder.html-xbo0Krpt.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/about.html-D2yzzIyM.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/changelog.html-Dqm5MIYd.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/contacts.html-BfIGgEZ9.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/future.html-BJR2WZUb.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/home.html-DAJQxBy-.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/api-example.html-CKw7e9Ka.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/api-exception.html-Pu6YF45s.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/api-using.html-CsMd954C.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-api-1-2-x.html-D8SebGDZ.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-api-1-3-x.html-CPnNzAVm.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/r8-proguard.html-DnD4WWCL.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-using.html-sNzVArkO.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/example.html-DBLcpd3T.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/home.html-Cg57uIpM.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/knowledge.html-CFMQgPep.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-new-api.html-kyRByfpu.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/quick-start.html-Dq2QHQuy.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/supportive.html-DFnCbU7r.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/yukihookapi-projectbuilder.html-DnghHaiT.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/host-lifecycle.html-BgnOErBM.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/logger.html-Dfs7bQRS.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/reflection.html-BohdUWGg.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-channel.html-DWoHNeKf.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-storage.html-ByKfNh6r.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/host-inject.html-COD96F06.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/host-lifecycle.html-C7PzYAZN.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/logger.html-BW4Gjfc-.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/reflection.html-DXPuhLBz.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-channel.html-B7eDf6ix.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-storage.html-CZy1SL3y.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookAPI.html-CtkZ6zEO.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookAPI.html-DqgBnIkU.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/InjectYukiHookWithXposed.html-BGS_DJ2i.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/CurrentClass.html-BT6y6bjW.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/GenericClass.html-CsB6lKmB.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/HookClass.html-CW_9kHEG.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/HookResources.html-B9Np_jgF.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/VariousClass.html-3D_jbtJ_.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiMemberHookCreator.html-C1zPXD2D.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResourcesHookCreator.html-RF6ZJecD.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiBaseHooker.html-CWm_43km.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ReflectionFactory.html-BTXWRqP4.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookFactory.html-BKpat8zr.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YLog.html-COO68ekD.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/HookParam.html-CQJSudBe.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/PackageParam.html-356ELE7K.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/InjectYukiHookWithXposed.html-C_GfVAhD.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/CurrentClass.html-Drrw8tv5.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/GenericClass.html-DO13T8ug.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/HookClass.html-CszRm9Er.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/HookResources.html-DA2dINvc.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/VariousClass.html-CKljcU2t.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiMemberHookCreator.html-C0fIOtqI.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResourcesHookCreator.html-DW5yilOs.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiBaseHooker.html-E78OJRmm.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ReflectionFactory.html-BiQJ-KKx.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookFactory.html-CoBstbjt.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YLog.html-KE-5aK_7.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/HookParam.html-SbRyLaGf.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/PackageParam.html-B3y0YF_m.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YLogData.html-XHmF_gos.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ComponentTypeFactory.html-DptIpBn2.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/GraphicsTypeFactory.html-CnqF4An8.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ViewTypeFactory.html-CIPHyInd.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/DefinedTypeFactory.html-DI2zOcK2.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/VariableTypeFactory.html-DDYYL3th.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleApplication.html-BkkBbb-2.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookDataChannel.html-DgdZw6CE.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookPrefsBridge.html-XzXYFQ1s.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/IYukiHookXposedInit.html-DEGewXhq.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YLogData.html-Bjac08gN.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ComponentTypeFactory.html-VD1JaHTz.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/GraphicsTypeFactory.html-Dq_zQQPa.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ViewTypeFactory.html-DPcuUPhN.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/DefinedTypeFactory.html-C97GePUm.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/VariableTypeFactory.html-BUNfn5Dn.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleApplication.html-C4NqW1gZ.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookDataChannel.html-Citru5C3.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookPrefsBridge.html-BG7-Nq7V.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/IYukiHookXposedInit.html-Dr7_YjoO.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookPriority.html-smxFpy5Q.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/BaseFinder.html-C6lfjJ7s.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/DexClassFinder.html-BAaqClmM.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorFinder.html-DuJIkaTM.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/FieldFinder.html-CoQdzzYH.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MethodFinder.html-DxYxJsjj.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiXposedEvent.html-BFs-WRvy.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiModuleResources.html-jRWj4Ooi.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResForwarder.html-DMGGwbMr.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResources.html-DzFxHHne.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelData.html-BX_rAvQg.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelPriority.html-BGoRh-pu.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleClassLoader.html-BFtfl5mt.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/PrefsData.html-B72hWN1s.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModulePreferenceFragment.html-CXpIHn7Z.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookPriority.html-AgDP0CYh.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/BaseFinder.html-CAvlkbqd.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/DexClassFinder.html-CGIuabI3.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorFinder.html-CmDHOksx.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/FieldFinder.html-C9KHPG3N.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MethodFinder.html-BepwXG9K.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiXposedEvent.html-C9AS9omI.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiModuleResources.html-DZnAa6JN.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResForwarder.html-CtCGVu9N.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResources.html--5kriWCV.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelData.html-C7ktasrE.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelPriority.html-BHp-ErCM.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleClassLoader.html-BwGRnYn5.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/PrefsData.html-BbIfbfIq.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModulePreferenceFragment.html-DSUkMTGs.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ExecutorType.html-Crao5k7G.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/CountRules.html-lW3FW-Bi.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModifierRules.html-DZnBFn8R.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/NameRules.html-BWk6zL2M.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ObjectRules.html-Dxosvxi0.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorRules.html-BuW8PcLh.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/FieldRules.html-DnAEAxmC.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRules.html-CzY4xHkS.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MethodRules.html-BCtTTlLz.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppActivity.html-CrhmOsh-.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppCompatActivity.html-JFvN5vF4.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleContextThemeWrapper.html-DNoARGj7.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ExecutorType.html-tZrR-ZDE.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/CountRules.html-BiTeupWL.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModifierRules.html-B9KoNMo6.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/NameRules.html-DopiK4pt.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ObjectRules.html-DjhVlNAH.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorRules.html-phFNNXJ8.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/FieldRules.html-DePoZYvp.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRules.html-r3ZOm1rb.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MethodRules.html-DETSSGJ6.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppActivity.html-BwDznH0J.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppCompatActivity.html-BCax3oQU.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleContextThemeWrapper.html-D3JVFalR.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRulesResult.html-DVBlYWR7.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRulesResult.html-4uRTQRQi.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/404.html-5sy5zeZP.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/index.html-c3VccwnD.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/index.html-Dzt_UNRi.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/index.html-4DaBElWx.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/home.html-CVkftkBs.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/about.html-C-lpYAFW.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/changelog.html-CQQRsaqn.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/contacts.html-DGWKGXQs.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/future.html-CwV0c7ai.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/api-example.html-BkSveST0.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/api-exception.html-BnnFmZj6.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/api-using.html-gj8msTn3.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-api-1-2-x.html-BuNeD6z1.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-api-1-3-x.html-B76n82pk.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/r8-proguard.html-BHukmedz.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-using.html-BkzbmISt.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/example.html-TKFBsGXZ.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/home.html-MVCE9Zi_.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/knowledge.html-BykbG15K.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-new-api.html-Duhp0Zbf.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/quick-start.html-BcYFAl9n.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/supportive.html-CqV3gXNz.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/yukihookapi-projectbuilder.html-QJoyeaEx.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/about.html-BXj0V4K6.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/changelog.html-CxCVrT4d.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/contacts.html-Dq-BMTBW.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/future.html-DBUw6EWt.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/home.html-BNdj0tg8.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/api-example.html-BJS_jXBZ.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/api-exception.html-CmmayJI1.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/api-using.html-DgFAU6YP.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-api-1-2-x.html-BgLq0xbj.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-api-1-3-x.html-erB3077C.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/r8-proguard.html-DQtMNDbO.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-using.html-CId2Csh7.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/example.html-C7DWr_jH.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/home.html-DBugrZvO.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/knowledge.html-H2f1ELBS.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-new-api.html-D81UznXK.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/quick-start.html-DSJOm7if.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/supportive.html-Bav7E8rs.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/yukihookapi-projectbuilder.html-yvia3rkA.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/host-lifecycle.html-BCud2pI7.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/logger.html-BPyE4AnF.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/reflection.html-D_aUVbM-.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-channel.html-DRcRt9U1.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-storage.html-Qejq3rQo.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/host-inject.html-Be_IEoPl.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/host-lifecycle.html-BQqaSmyu.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/logger.html-Di_Y0BXq.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/reflection.html-BrZNv2Lk.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-channel.html-DZAFeCTe.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-storage.html-BudvBu_7.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookAPI.html-BMPaDynr.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookAPI.html-BNn4qOF2.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/InjectYukiHookWithXposed.html-DUnOYTjb.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/CurrentClass.html-B2XdYzmq.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/GenericClass.html-Cpy6faaM.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/HookClass.html-De5b5ItR.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/HookResources.html-fPctU8Z9.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/VariousClass.html-UfzGncCn.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiMemberHookCreator.html-quaeBn-w.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResourcesHookCreator.html-BDhN88iE.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiBaseHooker.html-DODfMCkK.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ReflectionFactory.html-Cl4cXJzr.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookFactory.html-ByRVLukn.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YLog.html-Bj4UE5ed.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/HookParam.html-Cw_gQESk.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/PackageParam.html-qpkPOSPI.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/InjectYukiHookWithXposed.html-BXDS67lL.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/CurrentClass.html-etlMFNvF.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/GenericClass.html-qHyiepey.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/HookClass.html-BN5OdPwD.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/HookResources.html-VPUSsnNk.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/VariousClass.html-Bgp63gMz.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiMemberHookCreator.html-C_y1XUnh.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResourcesHookCreator.html-SAEPSbGI.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiBaseHooker.html-Ce9A9Xvl.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ReflectionFactory.html-Vjpcmtz-.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookFactory.html-CKcweszW.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YLog.html-Bf1ke36C.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/HookParam.html-hOt529IK.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/PackageParam.html-CedyE-3W.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YLogData.html-C2FO7fo2.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ComponentTypeFactory.html-3lHiJ4Q4.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/GraphicsTypeFactory.html-mMIHtQsR.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ViewTypeFactory.html-DYuznXgP.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/DefinedTypeFactory.html-THeGlp4B.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/VariableTypeFactory.html-BN3bs3sc.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleApplication.html-DfY4Uy3r.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookDataChannel.html-C-rITqOJ.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookPrefsBridge.html-C9c2C_AS.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/IYukiHookXposedInit.html-5CYtOoME.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YLogData.html-CwGRaY_F.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ComponentTypeFactory.html-BKNLMjVQ.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/GraphicsTypeFactory.html-CH0pOz43.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ViewTypeFactory.html-BugnWrJI.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/DefinedTypeFactory.html-Bxsp7dKR.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/VariableTypeFactory.html-Do1aKQAf.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleApplication.html-IEkRxGSX.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookDataChannel.html-C7X4MKor.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookPrefsBridge.html-GFvtl8SJ.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/IYukiHookXposedInit.html-OKPebiSt.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookPriority.html-40ZJcXQT.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/BaseFinder.html-B1T7fg6o.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/DexClassFinder.html-Cdns5UDz.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorFinder.html-BkaE4iS7.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/FieldFinder.html-CrBNztFb.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MethodFinder.html-BL49mMcu.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiXposedEvent.html-BiqbBVCH.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiModuleResources.html-D9PEjXE7.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResForwarder.html-FOQ2Nwig.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResources.html-DIg_e0Sr.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelData.html-Cw_H52Oq.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelPriority.html-DSXoOqHG.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleClassLoader.html-DSmQJ1ew.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/PrefsData.html-CBetrJQB.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModulePreferenceFragment.html-DuDN-nsj.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookPriority.html-B7oPy6Ok.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/BaseFinder.html-CjyL3Zs3.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/DexClassFinder.html-CElnm8j_.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorFinder.html-DwPmSL1t.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/FieldFinder.html-DKqO8jN2.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MethodFinder.html-pcv0_Rzw.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiXposedEvent.html-B2Vh7w-B.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiModuleResources.html-_4rKBpVF.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResForwarder.html-D7yHFtkz.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResources.html-Coh5V7rP.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelData.html-DvB2mgfs.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelPriority.html-B-1ft-lA.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleClassLoader.html-DWcj-tgD.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/PrefsData.html-CS03nvJw.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModulePreferenceFragment.html-CNQiRBx_.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ExecutorType.html-Q61audgZ.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/CountRules.html-Q-DusaM4.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModifierRules.html-BMN7vYT7.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/NameRules.html-BGjSl50o.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ObjectRules.html-jlI4kEM_.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorRules.html-skda4st-.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/FieldRules.html-DHcTqWY4.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRules.html-zo3axIRs.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MethodRules.html-BBqt5hni.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppActivity.html-Cjp5R2kL.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppCompatActivity.html-yzjjuZGo.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleContextThemeWrapper.html-Bm4CsRSg.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ExecutorType.html-mn0hFRoN.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/CountRules.html-DNfF0b6a.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModifierRules.html-CJKqpygK.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/NameRules.html-BYfKoeiT.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ObjectRules.html-BrgTsxIh.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorRules.html-HVV8WqL4.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/FieldRules.html-DsdccfYE.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRules.html-idNzK9kl.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MethodRules.html-Cx8zDjD9.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppActivity.html-CYywU1iW.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppCompatActivity.html-DrcRZom-.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleContextThemeWrapper.html-CQd6A0F6.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRulesResult.html-pov0whDg.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRulesResult.html-fLoCvHLk.js" as="script"><link rel="prefetch" href="/YukiHookAPI/assets/404.html-CP0DPwcn.js" as="script">
|
||
</head>
|
||
<body>
|
||
<div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/YukiHookAPI/en/" class=""><img class="logo" src="/YukiHookAPI/images/logo.png" alt="Yuki Hook API"><span class="site-name can-hide">Yuki Hook API</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Navigation"><span class="title">Navigation</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Navigation"><span class="title">Navigation</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Get Started</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/guide/home" class="" aria-label="Introduce"><!--[--><!--]--> Introduce <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/guide/supportive" class="" aria-label="Supportive"><!--[--><!--]--> Supportive <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/guide/knowledge" class="" aria-label="Basic Knowledge"><!--[--><!--]--> Basic Knowledge <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/guide/quick-start" class="" aria-label="Quick Start"><!--[--><!--]--> Quick Start <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/guide/example" class="" aria-label="Usage Example"><!--[--><!--]--> Usage Example <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/guide/move-to-new-api" class="" aria-label="Migrate from Other Hook APIs"><!--[--><!--]--> Migrate from Other Hook APIs <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Configs</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/api-example" class="" aria-label="API Basic Configs"><!--[--><!--]--> API Basic Configs <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/api-exception" class="" aria-label="API Exception Handling"><!--[--><!--]--> API Exception Handling <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/xposed-using" class="" aria-label="Use as Xposed Module Configs"><!--[--><!--]--> Use as Xposed Module Configs <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/api-using" class="" aria-label="Use as Hook API Configs"><!--[--><!--]--> Use as Hook API Configs <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/move-to-api-1-2-x" class="" aria-label="Migrate to YukiHookAPI 1.2.x"><!--[--><!--]--> Migrate to YukiHookAPI 1.2.x <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/move-to-api-1-3-x" class="" aria-label="Migrate to YukiHookAPI 1.3.x"><!--[--><!--]--> Migrate to YukiHookAPI 1.3.x <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/r8-proguard" class="" aria-label="R8 & Proguard Obfuscate"><!--[--><!--]--> R8 & Proguard Obfuscate <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Tools</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/tools/yukihookapi-projectbuilder" class="" aria-label="YukiHookAPI Project Builder"><!--[--><!--]--> YukiHookAPI Project Builder <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>API Document</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/api/home" class="" aria-label="Document Introduction"><!--[--><!--]--> Document Introduction <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/YukiHookAPI" class="" aria-label="Public API"><!--[--><!--]--> Public API <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/api/special-features/reflection" class="router-link-active" aria-label="Special Features"><!--[--><!--]--> Special Features <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>About</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/about/changelog" class="" aria-label="Changelog"><!--[--><!--]--> Changelog <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/about/future" class="" aria-label="Looking for Future"><!--[--><!--]--> Looking for Future <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/about/contacts" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/about/about" class="" aria-label="About this Document"><!--[--><!--]--> About this Document <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><!--]--></ul></div></div><div class="navbar-item"><a href="/YukiHookAPI/en/about/contacts" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></div><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Select language"><span class="title">English (US)</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Select language"><span class="title">English (US)</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a aria-current="page" href="/YukiHookAPI/en/api/special-features/host-inject.html" class="router-link-active router-link-exact-active router-link-active" aria-label="English"><!--[--><!--]--> English <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/YukiHookAPI/zh-cn/api/special-features/host-inject.html" class="" aria-label="简体中文"><!--[--><!--]--> 简体中文 <!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-item"><a class="external-link" href="https://github.com/HighCapable/YukiHookAPI" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-color-mode-button" title="toggle color mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><form class="search-box" role="search"><input type="search" placeholder="Search" autocomplete="off" spellcheck="false" value><!----></form></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-items"><!--[--><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Navigation"><span class="title">Navigation</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Navigation"><span class="title">Navigation</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Get Started</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/guide/home" class="" aria-label="Introduce"><!--[--><!--]--> Introduce <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/guide/supportive" class="" aria-label="Supportive"><!--[--><!--]--> Supportive <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/guide/knowledge" class="" aria-label="Basic Knowledge"><!--[--><!--]--> Basic Knowledge <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/guide/quick-start" class="" aria-label="Quick Start"><!--[--><!--]--> Quick Start <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/guide/example" class="" aria-label="Usage Example"><!--[--><!--]--> Usage Example <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/guide/move-to-new-api" class="" aria-label="Migrate from Other Hook APIs"><!--[--><!--]--> Migrate from Other Hook APIs <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Configs</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/api-example" class="" aria-label="API Basic Configs"><!--[--><!--]--> API Basic Configs <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/api-exception" class="" aria-label="API Exception Handling"><!--[--><!--]--> API Exception Handling <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/xposed-using" class="" aria-label="Use as Xposed Module Configs"><!--[--><!--]--> Use as Xposed Module Configs <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/api-using" class="" aria-label="Use as Hook API Configs"><!--[--><!--]--> Use as Hook API Configs <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/move-to-api-1-2-x" class="" aria-label="Migrate to YukiHookAPI 1.2.x"><!--[--><!--]--> Migrate to YukiHookAPI 1.2.x <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/move-to-api-1-3-x" class="" aria-label="Migrate to YukiHookAPI 1.3.x"><!--[--><!--]--> Migrate to YukiHookAPI 1.3.x <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/config/r8-proguard" class="" aria-label="R8 & Proguard Obfuscate"><!--[--><!--]--> R8 & Proguard Obfuscate <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Tools</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/tools/yukihookapi-projectbuilder" class="" aria-label="YukiHookAPI Project Builder"><!--[--><!--]--> YukiHookAPI Project Builder <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>API Document</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/api/home" class="" aria-label="Document Introduction"><!--[--><!--]--> Document Introduction <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/YukiHookAPI" class="" aria-label="Public API"><!--[--><!--]--> Public API <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/api/special-features/reflection" class="router-link-active" aria-label="Special Features"><!--[--><!--]--> Special Features <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>About</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/about/changelog" class="" aria-label="Changelog"><!--[--><!--]--> Changelog <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/about/future" class="" aria-label="Looking for Future"><!--[--><!--]--> Looking for Future <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/about/contacts" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/en/about/about" class="" aria-label="About this Document"><!--[--><!--]--> About this Document <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><!--]--></ul></div></div><div class="navbar-item"><a href="/YukiHookAPI/en/about/contacts" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></div><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Select language"><span class="title">English (US)</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Select language"><span class="title">English (US)</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a aria-current="page" href="/YukiHookAPI/en/api/special-features/host-inject.html" class="router-link-active router-link-exact-active router-link-active" aria-label="English"><!--[--><!--]--> English <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/YukiHookAPI/zh-cn/api/special-features/host-inject.html" class="" aria-label="简体中文"><!--[--><!--]--> 简体中文 <!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-item"><a class="external-link" href="https://github.com/HighCapable/YukiHookAPI" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">Get Started <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/en/guide/home.html" class="sidebar-item" aria-label="Introduction"><!--[--><!--]--> Introduction <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/guide/supportive.html" class="sidebar-item" aria-label="Supportive"><!--[--><!--]--> Supportive <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/guide/knowledge.html" class="sidebar-item" aria-label="Basic Knowledge"><!--[--><!--]--> Basic Knowledge <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/guide/quick-start.html" class="sidebar-item" aria-label="Quick Start"><!--[--><!--]--> Quick Start <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/guide/example.html" class="sidebar-item" aria-label="Usage Example"><!--[--><!--]--> Usage Example <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/guide/move-to-new-api.html" class="sidebar-item" aria-label="Migrate from Other Hook APIs"><!--[--><!--]--> Migrate from Other Hook APIs <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">Configs <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/en/config/api-example.html" class="sidebar-item" aria-label="API Basic Configs"><!--[--><!--]--> API Basic Configs <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/config/api-exception.html" class="sidebar-item" aria-label="API Exception Handling"><!--[--><!--]--> API Exception Handling <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/config/xposed-using.html" class="sidebar-item" aria-label="Use as Xposed Module Configs"><!--[--><!--]--> Use as Xposed Module Configs <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/config/api-using.html" class="sidebar-item" aria-label="Use as Hook API Configs"><!--[--><!--]--> Use as Hook API Configs <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/config/move-to-api-1-2-x.html" class="sidebar-item" aria-label="Migrate to YukiHookAPI 1.2.x"><!--[--><!--]--> Migrate to YukiHookAPI 1.2.x <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/config/move-to-api-1-3-x.html" class="sidebar-item" aria-label="Migrate to YukiHookAPI 1.3.x"><!--[--><!--]--> Migrate to YukiHookAPI 1.3.x <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/config/r8-proguard.html" class="sidebar-item" aria-label="R8 & Proguard Obfuscate"><!--[--><!--]--> R8 & Proguard Obfuscate <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">Tools <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/en/tools/yukihookapi-projectbuilder.html" class="sidebar-item" aria-label="YukiHookAPI Project Builder"><!--[--><!--]--> YukiHookAPI Project Builder <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading active collapsible">API Document <span class="down arrow"></span></p><ul style="" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/en/api/home.html" class="sidebar-item" aria-label="Document Introduce"><!--[--><!--]--> Document Introduce <!--[--><!--]--></a><!----></li><li><p tabindex="0" class="sidebar-item collapsible">Public API <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/YukiHookAPI.html" class="sidebar-item" aria-label="YukiHookAPI - object"><!--[--><!--]--> YukiHookAPI - object <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/param/PackageParam.html" class="sidebar-item" aria-label="PackageParam - class"><!--[--><!--]--> PackageParam - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/param/HookParam.html" class="sidebar-item" aria-label="HookParam - class"><!--[--><!--]--> HookParam - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/annotation/xposed/InjectYukiHookWithXposed.html" class="sidebar-item" aria-label="InjectYukiHookWithXposed - annotation"><!--[--><!--]--> InjectYukiHookWithXposed - annotation <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/proxy/IYukiHookXposedInit.html" class="sidebar-item" aria-label="IYukiHookXposedInit - interface"><!--[--><!--]--> IYukiHookXposedInit - interface <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/prefs/YukiHookPrefsBridge.html" class="sidebar-item" aria-label="YukiHookPrefsBridge - class"><!--[--><!--]--> YukiHookPrefsBridge - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/prefs/ui/ModulePreferenceFragment.html" class="sidebar-item" aria-label="ModulePreferenceFragment - class"><!--[--><!--]--> ModulePreferenceFragment - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/prefs/data/PrefsData.html" class="sidebar-item" aria-label="PrefsData - class"><!--[--><!--]--> PrefsData - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/channel/YukiHookDataChannel.html" class="sidebar-item" aria-label="YukiHookDataChannel - class"><!--[--><!--]--> YukiHookDataChannel - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/channel/data/ChannelData.html" class="sidebar-item" aria-label="ChannelData - class"><!--[--><!--]--> ChannelData - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/channel/priority/ChannelPriority.html" class="sidebar-item" aria-label="ChannelPriority - class"><!--[--><!--]--> ChannelPriority - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/application/ModuleApplication.html" class="sidebar-item" aria-label="ModuleApplication - class"><!--[--><!--]--> ModuleApplication - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/base/ModuleAppActivity.html" class="sidebar-item" aria-label="ModuleAppActivity - class"><!--[--><!--]--> ModuleAppActivity - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/base/ModuleAppCompatActivity.html" class="sidebar-item" aria-label="ModuleAppCompatActivity - class"><!--[--><!--]--> ModuleAppCompatActivity - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/parasitic/context/wrapper/ModuleContextThemeWrapper.html" class="sidebar-item" aria-label="ModuleContextThemeWrapper - class"><!--[--><!--]--> ModuleContextThemeWrapper - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/parasitic/reference/ModuleClassLoader.html" class="sidebar-item" aria-label="ModuleClassLoader - class"><!--[--><!--]--> ModuleClassLoader - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/bridge/resources/YukiModuleResources.html" class="sidebar-item" aria-label="YukiModuleResources - class"><!--[--><!--]--> YukiModuleResources - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/bridge/resources/YukiResources.html" class="sidebar-item" aria-label="YukiResources - class"><!--[--><!--]--> YukiResources - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/bridge/resources/YukiResForwarder.html" class="sidebar-item" aria-label="YukiResForwarder - class"><!--[--><!--]--> YukiResForwarder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/xposed/bridge/event/YukiXposedEvent.html" class="sidebar-item" aria-label="YukiXposedEvent - object"><!--[--><!--]--> YukiXposedEvent - object <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.html" class="sidebar-item" aria-label="ComponentTypeFactory - kt"><!--[--><!--]--> ComponentTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/type/android/GraphicsTypeFactory.html" class="sidebar-item" aria-label="GraphicsTypeFactory - kt"><!--[--><!--]--> GraphicsTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/type/android/ViewTypeFactory.html" class="sidebar-item" aria-label="ViewTypeFactory - kt"><!--[--><!--]--> ViewTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/type/java/VariableTypeFactory.html" class="sidebar-item" aria-label="VariableTypeFactory - kt"><!--[--><!--]--> VariableTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/type/defined/DefinedTypeFactory.html" class="sidebar-item" aria-label="DefinedTypeFactory - kt"><!--[--><!--]--> DefinedTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/log/YLog.html" class="sidebar-item" aria-label="YLog - object"><!--[--><!--]--> YLog - object <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/log/data/YLogData.html" class="sidebar-item" aria-label="YLogData - class"><!--[--><!--]--> YLogData - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/factory/ReflectionFactory.html" class="sidebar-item" aria-label="ReflectionFactory - kt"><!--[--><!--]--> ReflectionFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/factory/YukiHookFactory.html" class="sidebar-item" aria-label="YukiHookFactory - kt"><!--[--><!--]--> YukiHookFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/entity/YukiBaseHooker.html" class="sidebar-item" aria-label="YukiBaseHooker - class"><!--[--><!--]--> YukiBaseHooker - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/api/compat/type/ExecutorType.html" class="sidebar-item" aria-label="ExecutorType - class"><!--[--><!--]--> ExecutorType - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/api/priority/YukiHookPriority.html" class="sidebar-item" aria-label="YukiHookPriority - class"><!--[--><!--]--> YukiHookPriority - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/YukiMemberHookCreator.html" class="sidebar-item" aria-label="YukiMemberHookCreator - class"><!--[--><!--]--> YukiMemberHookCreator - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/YukiResourcesHookCreator.html" class="sidebar-item" aria-label="YukiResourcesHookCreator - class"><!--[--><!--]--> YukiResourcesHookCreator - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/members/MethodFinder.html" class="sidebar-item" aria-label="MethodFinder - class"><!--[--><!--]--> MethodFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/members/ConstructorFinder.html" class="sidebar-item" aria-label="ConstructorFinder - class"><!--[--><!--]--> ConstructorFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/members/FieldFinder.html" class="sidebar-item" aria-label="FieldFinder - class"><!--[--><!--]--> FieldFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/classes/DexClassFinder.html" class="sidebar-item" aria-label="DexClassFinder - class"><!--[--><!--]--> DexClassFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/classes/rules/result/MemberRulesResult.html" class="sidebar-item" aria-label="MemberRulesResult - class"><!--[--><!--]--> MemberRulesResult - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/classes/rules/MemberRules.html" class="sidebar-item" aria-label="MemberRules - class"><!--[--><!--]--> MemberRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/classes/rules/FieldRules.html" class="sidebar-item" aria-label="FieldRules - class"><!--[--><!--]--> FieldRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/classes/rules/MethodRules.html" class="sidebar-item" aria-label="MethodRules - class"><!--[--><!--]--> MethodRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/classes/rules/ConstructorRules.html" class="sidebar-item" aria-label="ConstructorRules - class"><!--[--><!--]--> ConstructorRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/base/BaseFinder.html" class="sidebar-item" aria-label="BaseFinder - class"><!--[--><!--]--> BaseFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/base/rules/CountRules.html" class="sidebar-item" aria-label="CountRules - class"><!--[--><!--]--> CountRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/base/rules/ModifierRules.html" class="sidebar-item" aria-label="ModifierRules - class"><!--[--><!--]--> ModifierRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/base/rules/NameRules.html" class="sidebar-item" aria-label="NameRules - class"><!--[--><!--]--> NameRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/core/finder/base/rules/ObjectRules.html" class="sidebar-item" aria-label="ObjectRules - class"><!--[--><!--]--> ObjectRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/bean/HookClass.html" class="sidebar-item" aria-label="HookClass - class"><!--[--><!--]--> HookClass - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/bean/VariousClass.html" class="sidebar-item" aria-label="VariousClass - class"><!--[--><!--]--> VariousClass - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/bean/CurrentClass.html" class="sidebar-item" aria-label="CurrentClass - class"><!--[--><!--]--> CurrentClass - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/bean/GenericClass.html" class="sidebar-item" aria-label="GenericClass - class"><!--[--><!--]--> GenericClass - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/public/com/highcapable/yukihookapi/hook/bean/HookResources.html" class="sidebar-item" aria-label="HookResources - class"><!--[--><!--]--> HookResources - class <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item active collapsible">Special Features <span class="down arrow"></span></p><ul style="" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/en/api/special-features/reflection.html" class="sidebar-item" aria-label="Reflection Extensions (Migrated)"><!--[--><!--]--> Reflection Extensions (Migrated) <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/special-features/logger.html" class="sidebar-item" aria-label="Debug Logs"><!--[--><!--]--> Debug Logs <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/special-features/xposed-storage.html" class="sidebar-item" aria-label="Xposed Module Data Storage"><!--[--><!--]--> Xposed Module Data Storage <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/special-features/xposed-channel.html" class="sidebar-item" aria-label="Xposed Module and Host Channel"><!--[--><!--]--> Xposed Module and Host Channel <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/api/special-features/host-lifecycle.html" class="sidebar-item" aria-label="Host Lifecycle Extension"><!--[--><!--]--> Host Lifecycle Extension <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/en/api/special-features/host-inject.html" class="router-link-active router-link-exact-active router-link-active sidebar-item active" aria-label="Host Resource Injection Extension"><!--[--><!--]--> Host Resource Injection Extension <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/YukiHookAPI/en/api/special-features/host-inject.html#inject-module-app-s-resources" class="router-link-active router-link-exact-active sidebar-item" aria-label="Inject Module App's Resources"><!--[--><!--]--> Inject Module App's Resources <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/en/api/special-features/host-inject.html#register-module-app-s-activity" class="router-link-active router-link-exact-active sidebar-item" aria-label="Register Module App's Activity"><!--[--><!--]--> Register Module App's Activity <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/en/api/special-features/host-inject.html#create-contextthemewrapper-proxy" class="router-link-active router-link-exact-active sidebar-item" aria-label="Create ContextThemeWrapper Proxy"><!--[--><!--]--> Create ContextThemeWrapper Proxy <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/en/api/special-features/host-inject.html#classloader-conflict-problem" class="router-link-active router-link-exact-active sidebar-item" aria-label="ClassLoader Conflict Problem"><!--[--><!--]--> ClassLoader Conflict Problem <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">About <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/en/about/changelog.html" class="sidebar-item" aria-label="Changelog"><!--[--><!--]--> Changelog <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/about/future.html" class="sidebar-item" aria-label="Looking Toward the Future"><!--[--><!--]--> Looking Toward the Future <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/about/contacts.html" class="sidebar-item" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/en/about/about.html" class="sidebar-item" aria-label="About This Document"><!--[--><!--]--> About This Document <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><!--]--><div><h1 id="host-resource-injection-extension" tabindex="-1"><a class="header-anchor" href="#host-resource-injection-extension" aria-hidden="true">#</a> Host Resource Injection Extension</h1><blockquote><p>This is an extension that injects Module App's Resources, <code>Activity</code> components, and <code>Context</code> topics into the Host App.</p></blockquote><p>Before using the following functions, in order to prevent Resource Id from conflicting with each other, you need to modify the Resource Id in the <code>build.gradle</code> of the current Xposed Module project.</p><blockquote><p>Kotlin DSL</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#DCBDFB;">android</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> androidResources.additionalParameters </span><span style="color:#F47067;">+=</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">listOf</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"--allow-reserved-package-id"</span><span style="color:#ADBAC7;">, </span><span style="color:#96D0FF;">"--package-id"</span><span style="color:#ADBAC7;">, </span><span style="color:#96D0FF;">"0x64"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><blockquote><p>Groovy DSL</p></blockquote><div class="language-groovy line-numbers-mode" data-ext="groovy"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#ADBAC7;">android {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> androidResources</span><span style="color:#F47067;">.</span><span style="color:#ADBAC7;">additionalParameters </span><span style="color:#F47067;">+=</span><span style="color:#ADBAC7;"> [</span><span style="color:#96D0FF;">'--allow-reserved-package-id'</span><span style="color:#ADBAC7;">, </span><span style="color:#96D0FF;">'--package-id'</span><span style="color:#ADBAC7;">, </span><span style="color:#96D0FF;">'0x64'</span><span style="color:#ADBAC7;">]</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container warning"><p class="custom-container-title">Notice</p><p><strong>aaptOptions.additionalParameters</strong> in previous versions has been deprecated, please refer to the above writing method and keep your <strong>Android Gradle Plugin</strong> to the latest version.</p><p>The sample Resource Id value provided is for reference only, <strong>0x7f</strong> cannot be used, the default is <strong>0x64</strong>.</p><p>In order to prevent the existence of multiple Xposed Modules in the current Host App, it is recommended to customize your own Resource Id.</p></div><h2 id="inject-module-app-s-resources" tabindex="-1"><a class="header-anchor" href="#inject-module-app-s-resources" aria-hidden="true">#</a> Inject Module App's Resources</h2><p>After the Host App is hooked, we can directly inject the <code>Context</code> obtained in the Hooker into the current Module App's Resources.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#DCBDFB;">resolve</span><span style="color:#ADBAC7;">().</span><span style="color:#DCBDFB;">firstMethod</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"onCreate"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">parameters</span><span style="color:#ADBAC7;">(Bundle::</span><span style="color:#DCBDFB;">class</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.</span><span style="color:#DCBDFB;">hook</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">after</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">instance</span><span style="color:#ADBAC7;"><</span><span style="color:#F69D50;">Activity</span><span style="color:#ADBAC7;">>().</span><span style="color:#DCBDFB;">also</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// <Scenario 1> Inject Module App's Resources through Context</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> it.</span><span style="color:#DCBDFB;">injectModuleAppResources</span><span style="color:#ADBAC7;">()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// <Scenario 2> Get the Host App's Resources directly and inject the Module App's Resources</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> it.resources.</span><span style="color:#DCBDFB;">injectModuleAppResources</span><span style="color:#ADBAC7;">()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Use the Module App's Resource Id directly</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> it.</span><span style="color:#DCBDFB;">getString</span><span style="color:#ADBAC7;">(R.id.app_name)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>You can also inject current Module App's Resources directly in <code>AppLifecycle</code>.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#DCBDFB;">onAppLifecycle</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">onCreate</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Globally inject Module App's Resources, but only in the global lifecycle</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Methods like ImageView.setImageResource need to be injected separately in Activity</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// <Scenario 1> Inject Module App's Resources through Context</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">injectModuleAppResources</span><span style="color:#ADBAC7;">()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// <Scenario 2> Get the Host App's Resources directly and inject the Module App's Resources</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> resources.</span><span style="color:#DCBDFB;">injectModuleAppResources</span><span style="color:#ADBAC7;">()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Use the Module App's Resource Id directly</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">getString</span><span style="color:#ADBAC7;">(R.id.app_name)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">Tips</p><p>For more functions, please refer to the <a href="../public/com/highcapable/yukihookapi/hook/factory/YukiHookFactory#context-resources-injectmoduleappresources-ext-method">Context+Resources.injectModuleAppResources</a> method.</p></div><h2 id="register-module-app-s-activity" tabindex="-1"><a class="header-anchor" href="#register-module-app-s-activity" aria-hidden="true">#</a> Register Module App's Activity</h2><p>When the <code>Activity</code> of all applications in the Android system starts, it needs to be registered in <code>AndroidManifest.xml</code>.</p><p>During the Hook process, if we want to directly start the unregistered <code>Activity</code> in the Module App through the Host App, what should we do?</p><p>After the Host App is hooked, we can directly register the <code>Activity</code> proxy of the current Module App in the <code>Context</code> obtained in the Hooker.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#DCBDFB;">resolve</span><span style="color:#ADBAC7;">().</span><span style="color:#DCBDFB;">firstMethod</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"onCreate"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">parameters</span><span style="color:#ADBAC7;">(Bundle::</span><span style="color:#DCBDFB;">class</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.</span><span style="color:#DCBDFB;">hook</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">after</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">instance</span><span style="color:#ADBAC7;"><</span><span style="color:#F69D50;">Activity</span><span style="color:#ADBAC7;">>().</span><span style="color:#DCBDFB;">registerModuleAppActivities</span><span style="color:#ADBAC7;">()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>You can also register the current Module App's <code>Activity</code> proxy directly in <code>AppLifecycle</code>.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#DCBDFB;">onAppLifecycle</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">onCreate</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">registerModuleAppActivities</span><span style="color:#ADBAC7;">()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>If the <code>proxy</code> parameter is not filled in, the API will automatically obtain the current Host App's launching entry <code>Activity</code> for proxying according to the current <code>Context</code>.</p><p>Usually, it works, but the above situation will fail in some apps, for example, some <code>Activity</code> will add launching parameters to the registration list, so we need to use another solution.</p><p>If the unregistered <code>Activity</code> cannot be launched correctly, we can manually get the Host App's <code>AndroidManifest.xml</code> for analysis to get a registered <code>Activity</code> tag and get the <code>name</code>.</p><p>You need to choose an unneeded <code>Activity</code> that may not be used by the current Host App as a "puppet" to proxy it, which usually works.</p><p>For example, we have found a suitable <code>Activity</code> that can be proxied.</p><blockquote><p>The following example</p></blockquote><div class="language-xml line-numbers-mode" data-ext="xml"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#ADBAC7;"><</span><span style="color:#8DDB8C;">activity</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">android:name</span><span style="color:#ADBAC7;">=</span><span style="color:#96D0FF;">"com.demo.test.activity.TestActivity"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> ...></span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>According to the <code>name</code>, we only need to add this parameter to the method for registration.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#DCBDFB;">registerModuleAppActivities</span><span style="color:#ADBAC7;">(proxy </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.demo.test.activity.TestActivity"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>Alternatively, if you write a <code>stub</code> for the Host App's class, you can register it directly through the <code>Class</code> object.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#DCBDFB;">registerModuleAppActivities</span><span style="color:#ADBAC7;">(TestActivity::</span><span style="color:#DCBDFB;">class</span><span style="color:#ADBAC7;">.java)</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>After registration is completed, please implement the <code>ModuleActivity</code> interface using the <code>Activity</code> module in the host-started module.</p><p>These <code>Activity</code> (ies) now live seamlessly in the host without registration.</p><p>We recommend that you create <code>BaseActivity</code> as the base class for all modules <code>Activity</code>.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#F47067;">abstract</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">BaseActivity</span><span style="color:#ADBAC7;"> : </span><span style="color:#F69D50;">AppCompatActivity</span><span style="color:#ADBAC7;">(), </span><span style="color:#DCBDFB;">ModuleActivity</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Set up AppCompat Theme (if currently is [AppCompatActivity])</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> moduleTheme </span><span style="color:#F47067;">get</span><span style="color:#ADBAC7;">() </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> R.style.YourAppTheme</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">getClassLoader</span><span style="color:#ADBAC7;">() </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> delegate.</span><span style="color:#DCBDFB;">getClassLoader</span><span style="color:#ADBAC7;">()</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">onCreate</span><span style="color:#ADBAC7;">(savedInstanceState: </span><span style="color:#F69D50;">Bundle</span><span style="color:#ADBAC7;">?) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> delegate.</span><span style="color:#DCBDFB;">onCreate</span><span style="color:#ADBAC7;">(savedInstanceState)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">super</span><span style="color:#ADBAC7;">.</span><span style="color:#DCBDFB;">onCreate</span><span style="color:#ADBAC7;">(savedInstanceState)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">onConfigurationChanged</span><span style="color:#ADBAC7;">(newConfig: </span><span style="color:#F69D50;">Configuration</span><span style="color:#ADBAC7;">) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> delegate.</span><span style="color:#DCBDFB;">onConfigurationChanged</span><span style="color:#ADBAC7;">(newConfig)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">super</span><span style="color:#ADBAC7;">.</span><span style="color:#DCBDFB;">onConfigurationChanged</span><span style="color:#ADBAC7;">(newConfig)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">onRestoreInstanceState</span><span style="color:#ADBAC7;">(savedInstanceState: </span><span style="color:#F69D50;">Bundle</span><span style="color:#ADBAC7;">) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> delegate.</span><span style="color:#DCBDFB;">onRestoreInstanceState</span><span style="color:#ADBAC7;">(savedInstanceState)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">super</span><span style="color:#ADBAC7;">.</span><span style="color:#DCBDFB;">onRestoreInstanceState</span><span style="color:#ADBAC7;">(savedInstanceState)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Then inherit the <code>Activity</code> you want to implement in <code>BaseActivity</code>.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">HostTestActivity</span><span style="color:#ADBAC7;"> : </span><span style="color:#F69D50;">BaseActivity</span><span style="color:#ADBAC7;">() {</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">onCreate</span><span style="color:#ADBAC7;">(savedInstanceState: </span><span style="color:#F69D50;">Bundle</span><span style="color:#ADBAC7;">?) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">super</span><span style="color:#ADBAC7;">.</span><span style="color:#DCBDFB;">onCreate</span><span style="color:#ADBAC7;">(savedInstanceState)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Module App's Resources have been injected automatically</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// You can directly use xml to load the layout</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">setContentView</span><span style="color:#ADBAC7;">(R.layout.activity_main)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>After all the above steps are completed, you can happily call <code>startActivity</code> anywhere in the (Xposed) Host environment where a <code>Context</code> exists.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> context: </span><span style="color:#F69D50;">Context</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">..</span><span style="color:#ADBAC7;">. </span><span style="color:#768390;">// Assume this is your Context</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">context.</span><span style="color:#DCBDFB;">startActivity</span><span style="color:#ADBAC7;">(context, HostTestActivity::</span><span style="color:#DCBDFB;">class</span><span style="color:#ADBAC7;">.java)</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><p>The <code>proxy</code> parameter we set in the <code>registerModuleAppActivities</code> method above is the default global proxy <code>Activity</code>.</p><p>If you need to specify a delegated <code>Activity</code> to use another Host App's <code>Activity</code> as a proxy, you can refer to the following method.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">HostTestActivity</span><span style="color:#ADBAC7;"> : </span><span style="color:#F69D50;">BaseActivity</span><span style="color:#ADBAC7;">() {</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Specify an additional proxy Activity class name</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Which must also exist in the Host App's AndroidManifest</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> proxyClassName </span><span style="color:#F47067;">get</span><span style="color:#ADBAC7;">() </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.demo.test.activity.OtherActivity"</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">onCreate</span><span style="color:#ADBAC7;">(savedInstanceState: </span><span style="color:#F69D50;">Bundle</span><span style="color:#ADBAC7;">?) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">super</span><span style="color:#ADBAC7;">.</span><span style="color:#DCBDFB;">onCreate</span><span style="color:#ADBAC7;">(savedInstanceState)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Module App's Resources have been injected automatically</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// You can directly use xml to load the layout</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">setContentView</span><span style="color:#ADBAC7;">(R.layout.activity_main)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">Tips</p><p>For more functions, please refer to the <a href="../public/com/highcapable/yukihookapi/hook/factory/YukiHookFactory#context-registermoduleappactivities-ext-method">Context.registerModuleAppActivities</a> method.</p></div><h2 id="create-contextthemewrapper-proxy" tabindex="-1"><a class="header-anchor" href="#create-contextthemewrapper-proxy" aria-hidden="true">#</a> Create ContextThemeWrapper Proxy</h2><p>Sometimes, we need to use <code>MaterialAlertDialogBuilder</code> to beautify our own dialogs in the Host App, but we can't create them without the AppCompat theme.</p><ul><li>Will got the following exception</li></ul><div class="language-text" data-ext="text"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#adbac7;">The style on this component requires your app theme to be Theme.AppCompat (or a descendant).</span></span>
|
||
<span class="line"><span style="color:#adbac7;"></span></span></code></pre></div><p>At this time, we want to use <code>MaterialAlertDialogBuilder</code> to create a dialog in the current <code>Activity</code> of the Host App being hooked, you can have the following methods.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#DCBDFB;">resolve</span><span style="color:#ADBAC7;">().</span><span style="color:#DCBDFB;">firstMethod</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"onCreate"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">parameters</span><span style="color:#ADBAC7;">(Bundle::</span><span style="color:#DCBDFB;">class</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.</span><span style="color:#DCBDFB;">hook</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">after</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Use applyModuleTheme to create a theme resource in the current Module App</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> appCompatContext </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">instance</span><span style="color:#ADBAC7;"><</span><span style="color:#F69D50;">Activity</span><span style="color:#ADBAC7;">>().</span><span style="color:#DCBDFB;">applyModuleTheme</span><span style="color:#ADBAC7;">(R.style.Theme_AppCompat)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Directly use this Context that wraps the Module App's theme to create a dialog</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">MaterialAlertDialogBuilder</span><span style="color:#ADBAC7;">(appCompatContext)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .</span><span style="color:#DCBDFB;">setTitle</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"AppCompat Theme Dialog"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .</span><span style="color:#DCBDFB;">setMessage</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"I am an AppCompat theme dialog displayed in the Host App."</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .</span><span style="color:#DCBDFB;">setPositiveButton</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"OK"</span><span style="color:#ADBAC7;">, </span><span style="color:#6CB6FF;">null</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .</span><span style="color:#DCBDFB;">show</span><span style="color:#ADBAC7;">()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>You can also set the system (native) night mode and day mode on the current <code>Context</code> through <code>uiMode</code>.</p><p>Which requires at least Android 10 and above system version support and the current theme contains night mode related elements.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#DCBDFB;">resolve</span><span style="color:#ADBAC7;">().</span><span style="color:#DCBDFB;">firstMethod</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"onCreate"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">parameters</span><span style="color:#ADBAC7;">(Bundle::</span><span style="color:#DCBDFB;">class</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.</span><span style="color:#DCBDFB;">hook</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">after</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Define the theme resource in the current Module App</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">var</span><span style="color:#ADBAC7;"> appCompatContext: </span><span style="color:#F69D50;">ModuleContextThemeWrapper</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// <Scenario 1> Get the Configuration object directly to set</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> appCompatContext </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">instance</span><span style="color:#ADBAC7;"><</span><span style="color:#F69D50;">Activity</span><span style="color:#ADBAC7;">>()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .</span><span style="color:#DCBDFB;">applyModuleTheme</span><span style="color:#ADBAC7;">(R.style.Theme_AppCompat)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .</span><span style="color:#DCBDFB;">applyConfiguration</span><span style="color:#ADBAC7;"> { uiMode </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> Configuration.UI_MODE_NIGHT_YES }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// <Scenario 2> Create a new Configuration object</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// This solution will destroy the original font scaling and other settings in the current Host App</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// You need to manually re-pass parameters such as densityDpi</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> appCompatContext </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">instance</span><span style="color:#ADBAC7;"><</span><span style="color:#F69D50;">Activity</span><span style="color:#ADBAC7;">>().</span><span style="color:#DCBDFB;">applyModuleTheme</span><span style="color:#ADBAC7;">(</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> theme </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> R.style.Theme_AppCompat,</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> configuration </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Configuration</span><span style="color:#ADBAC7;">().</span><span style="color:#DCBDFB;">apply</span><span style="color:#ADBAC7;"> { uiMode </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> Configuration.UI_MODE_NIGHT_YES }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> )</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Directly use this Context that wraps the Module App's theme to create a dialog</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">MaterialAlertDialogBuilder</span><span style="color:#ADBAC7;">(appCompatContext)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .</span><span style="color:#DCBDFB;">setTitle</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"AppCompat Theme Dialog"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .</span><span style="color:#DCBDFB;">setMessage</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"I am an AppCompat theme dialog displayed in the Host App."</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .</span><span style="color:#DCBDFB;">setPositiveButton</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"OK"</span><span style="color:#ADBAC7;">, </span><span style="color:#6CB6FF;">null</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .</span><span style="color:#DCBDFB;">show</span><span style="color:#ADBAC7;">()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>This way, we can create dialogs in the Host App very simply using <code>MaterialAlertDialogBuilder</code>.</p><div class="custom-container warning"><p class="custom-container-title">Possible Problems</p><p>Because some <strong>androidx</strong> dependent libraries or custom themes used by some apps may interfere with the actual style of the current <strong>MaterialAlertDialog</strong>, such as the button style of the dialog.</p><p>You can refer to the <strong>Module App Demo</strong> in this case and see <a href="https://github.com/HighCapable/YukiHookAPI/tree/master/samples/demo-module/src/main/java/com/highcapable/yukihookapi/demo_module/hook/factory/ComponentCompatFactory.kt" target="_blank" rel="noopener noreferrer">here is the sample code<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> to fix this problem.</p><p><strong>ClassCastException</strong> may occur when some apps are created, please manually specify a new <strong>Configuration</strong> instance to fix.</p></div><div class="custom-container tip"><p class="custom-container-title">Tips</p><p>For more functions, please refer to the <a href="../public/com/highcapable/yukihookapi/hook/factory/YukiHookFactory#context-applymoduletheme-ext-method">Context.applyModuleTheme</a> method.</p></div><h2 id="classloader-conflict-problem" tabindex="-1"><a class="header-anchor" href="#classloader-conflict-problem" aria-hidden="true">#</a> ClassLoader Conflict Problem</h2><p>The content introduced on this page is to directly inject the resources of the Module App into the Host App.</p><p>Since the Module App and the Host App are not in the same process (the same <strong>APK</strong>), there may be a <code>ClassLoader</code> conflict.</p><p>If a <code>ClassLoader</code> conflict occurs, you may encounter a <code>ClassCastException</code>.</p><p><code>YukiHookAPI</code> has solved the problem of possible conflicts by default, and you need to configure the exclusion list by yourself in other cases.</p><p>The exclusion list determines whether these <code>Class</code> need to be loaded by the Module App or the Host App's <code>ClassLoader</code>.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#768390;">// Exclude Class names belonging to the Host App</span></span>
|
||
<span class="line"><span style="color:#768390;">// They will be loaded by the Host App's ClassLoader</span></span>
|
||
<span class="line"><span style="color:#768390;">// The following content is for demonstration only</span></span>
|
||
<span class="line"><span style="color:#768390;">// DO NOT USE IT DIRECTLY, please refer to your actual situation</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">ModuleClassLoader.</span><span style="color:#DCBDFB;">excludeHostClasses</span><span style="color:#ADBAC7;">(</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"androidx.core.app.ActivityCompat"</span><span style="color:#ADBAC7;">,</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.demo.Test"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#768390;">// Exclude Class names belonging to the Module App</span></span>
|
||
<span class="line"><span style="color:#768390;">// They will be loaded by the ClassLoader of the Module App (the current Hook process)</span></span>
|
||
<span class="line"><span style="color:#768390;">// The following content is for demonstration only</span></span>
|
||
<span class="line"><span style="color:#768390;">// DO NOT USE IT DIRECTLY, please refer to your actual situation</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">ModuleClassLoader.</span><span style="color:#DCBDFB;">excludeModuleClasses</span><span style="color:#ADBAC7;">(</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.demo.entry.HookEntry"</span><span style="color:#ADBAC7;">,</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.demo.controller.ModuleController"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>You need to set it before the method of injecting Module App's resources into the Host App is executed to take effect.</p><p>This function is only to solve the situation that <strong><code>Class</code> with the same name</strong> may exist in the Host App and Module App, such as shared SDK and dependencies.</p><p>In most cases, you will not use this function.</p><div class="custom-container tip"><p class="custom-container-title">Tips</p><p>For more functions, please refer to <a href="../public/com/highcapable/yukihookapi/hook/xposed/parasitic/reference/ModuleClassLoader">ModuleClassLoader</a>.</p></div></div><!--[--><!--]--></div><footer class="page-meta"><div class="meta-item edit-link"><a class="external-link meta-item-label" href="https://github.com/HighCapable/YukiHookAPI/edit/master/docs-source/src/en/api/special-features/host-inject.md" rel="noopener noreferrer" target="_blank" aria-label="Edit this page on GitHub"><!--[--><!--]--> Edit this page on GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><div class="meta-item contributors"><span class="meta-item-label">Contributors: </span><span class="meta-item-info"><!--[--><!--[--><span class="contributor" title="email: qzmmcn@163.com">fankesyooni</span><!----><!--]--><!--]--></span></div></footer><nav class="page-nav"><p class="inner"><span class="prev"><a href="/YukiHookAPI/en/api/special-features/host-lifecycle.html" class="" aria-label="Host Lifecycle Extension"><!--[--><!--]--> Host Lifecycle Extension <!--[--><!--]--></a></span><!----></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
|
||
<script type="module" src="/YukiHookAPI/assets/app-Dh3YGII_.js" defer></script>
|
||
</body>
|
||
</html>
|