Add more apps support
This commit is contained in:
parent
d60bee2ed8
commit
1c18e39f46
3 changed files with 15 additions and 3 deletions
|
@ -9,9 +9,13 @@ An Android Xposed module to remove sponsored messages of Telegram
|
||||||
- **Official** org.telegram.messenger.beta
|
- **Official** org.telegram.messenger.beta
|
||||||
- **NekoX** nekox.messenger
|
- **NekoX** nekox.messenger
|
||||||
- **Nekogram** tw.nekomimi.nekogram
|
- **Nekogram** tw.nekomimi.nekogram
|
||||||
|
- **Nanogram** com.cool2645.nekolite
|
||||||
- **Plus Messenger** org.telegram.plus
|
- **Plus Messenger** org.telegram.plus
|
||||||
- **iMe Messenger** com.iMe.android
|
- **iMe Messenger** com.iMe.android
|
||||||
- **BGram** org.telegram.BifToGram
|
- **BGram** org.telegram.BifToGram
|
||||||
|
- **Catogram** ua.itaysonlab.messenger
|
||||||
|
- **Forkgram** org.forkclient.messenger.beta
|
||||||
|
- **aka** org.aka.messenger
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
@ -16,16 +16,20 @@ public class MainHook implements IXposedHookLoadPackage {
|
||||||
"org.telegram.messenger.beta",
|
"org.telegram.messenger.beta",
|
||||||
"nekox.messenger",
|
"nekox.messenger",
|
||||||
"tw.nekomimi.nekogram",
|
"tw.nekomimi.nekogram",
|
||||||
|
"com.cool2645.nekolite",
|
||||||
"org.telegram.plus",
|
"org.telegram.plus",
|
||||||
"com.iMe.android",
|
"com.iMe.android",
|
||||||
"org.telegram.BifToGram");
|
"org.telegram.BifToGram",
|
||||||
|
"ua.itaysonlab.messenger",
|
||||||
|
"org.forkclient.messenger.beta",
|
||||||
|
"org.aka.messenger");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam lpparam) {
|
public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam lpparam) {
|
||||||
if (hookPackages.contains(lpparam.packageName)) {
|
if (hookPackages.contains(lpparam.packageName)) {
|
||||||
try {
|
try {
|
||||||
Class<?> chatUIActivityClass = XposedHelpers.findClass("org.telegram.ui.ChatActivity", lpparam.classLoader);
|
Class<?> messagesControllerClass = XposedHelpers.findClass("org.telegram.messenger.MessagesController", lpparam.classLoader);
|
||||||
XposedBridge.hookAllMethods(chatUIActivityClass, "addSponsoredMessages", XC_MethodReplacement.returnConstant(null));
|
XposedBridge.hookAllMethods(messagesControllerClass, "getSponsoredMessages", XC_MethodReplacement.returnConstant(null));
|
||||||
} catch (Throwable ignored) {
|
} catch (Throwable ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,12 @@
|
||||||
<item>org.telegram.messenger.beta</item>
|
<item>org.telegram.messenger.beta</item>
|
||||||
<item>nekox.messenger</item>
|
<item>nekox.messenger</item>
|
||||||
<item>tw.nekomimi.nekogram</item>
|
<item>tw.nekomimi.nekogram</item>
|
||||||
|
<item>com.cool2645.nekolite</item>
|
||||||
<item>org.telegram.plus</item>
|
<item>org.telegram.plus</item>
|
||||||
<item>com.iMe.android</item>
|
<item>com.iMe.android</item>
|
||||||
<item>org.telegram.BifToGram</item>
|
<item>org.telegram.BifToGram</item>
|
||||||
|
<item>ua.itaysonlab.messenger</item>
|
||||||
|
<item>org.forkclient.messenger.beta</item>
|
||||||
|
<item>org.aka.messenger</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Add table
Reference in a new issue