Add more apps support

This commit is contained in:
Shatyuka 2021-11-11 16:57:29 +08:00
parent d60bee2ed8
commit 1c18e39f46
3 changed files with 15 additions and 3 deletions

View file

@ -9,9 +9,13 @@ An Android Xposed module to remove sponsored messages of Telegram
- **Official** org.telegram.messenger.beta
- **NekoX** nekox.messenger
- **Nekogram** tw.nekomimi.nekogram
- **Nanogram** com.cool2645.nekolite
- **Plus Messenger** org.telegram.plus
- **iMe Messenger** com.iMe.android
- **BGram** org.telegram.BifToGram
- **Catogram** ua.itaysonlab.messenger
- **Forkgram** org.forkclient.messenger.beta
- **aka** org.aka.messenger
## License

View file

@ -16,16 +16,20 @@ public class MainHook implements IXposedHookLoadPackage {
"org.telegram.messenger.beta",
"nekox.messenger",
"tw.nekomimi.nekogram",
"com.cool2645.nekolite",
"org.telegram.plus",
"com.iMe.android",
"org.telegram.BifToGram");
"org.telegram.BifToGram",
"ua.itaysonlab.messenger",
"org.forkclient.messenger.beta",
"org.aka.messenger");
@Override
public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam lpparam) {
if (hookPackages.contains(lpparam.packageName)) {
try {
Class<?> chatUIActivityClass = XposedHelpers.findClass("org.telegram.ui.ChatActivity", lpparam.classLoader);
XposedBridge.hookAllMethods(chatUIActivityClass, "addSponsoredMessages", XC_MethodReplacement.returnConstant(null));
Class<?> messagesControllerClass = XposedHelpers.findClass("org.telegram.messenger.MessagesController", lpparam.classLoader);
XposedBridge.hookAllMethods(messagesControllerClass, "getSponsoredMessages", XC_MethodReplacement.returnConstant(null));
} catch (Throwable ignored) {
}
}

View file

@ -6,8 +6,12 @@
<item>org.telegram.messenger.beta</item>
<item>nekox.messenger</item>
<item>tw.nekomimi.nekogram</item>
<item>com.cool2645.nekolite</item>
<item>org.telegram.plus</item>
<item>com.iMe.android</item>
<item>org.telegram.BifToGram</item>
<item>ua.itaysonlab.messenger</item>
<item>org.forkclient.messenger.beta</item>
<item>org.aka.messenger</item>
</string-array>
</resources>