我如何为app动作设置特定包(app)

问题描述 投票:0回答:1

你好,有一个应用程序添加贴纸到whatsapp。

并且有3个版本的whatsapp与不同的包名称

com.whatsapp
com.gbwhatsapp
com.gbwhatsapp3

我希望我的应用贴纸只添加贴纸到com.gbwhatsapp,我不希望看到complite动作与消息

我试图改变行动和许多事情,但应用程序崩溃

添加贴纸的动作是:

com.whatsapp.intent.action.ENABLE_STICKER_PACK

Screenshot

贴纸应用程序中的代码是

new-instance v0, Landroid/content/Intent;

invoke-direct {v0}, Landroid/content/Intent;-><init>()V

const-string v1, "com.whatsapp.intent.action.ENABLE_STICKER_PACK"

invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

我可以在此之后将代码添加到com.gbwhatsapp的特定应用程序包中以执行此操作吗?

我正在使用apktool

android apk smali apktool
1个回答
0
投票

您可以添加对Intent.setPackage的调用。例如

const-string v1, "com.gbwhatsapp"
invoke-virtual {v0, v1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
© www.soinside.com 2019 - 2024. All rights reserved.