【问题标题】:How i can set Specific package (app) for app action我如何为应用操作设置特定包(应用)
【发布时间】:2019-04-19 14:48:00
【问题描述】:

你好,有一个应用可以向 whatsapp 添加贴纸。

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

com.whatsapp
com.gbwhatsapp
com.gbwhatsapp3

我希望我的应用贴纸仅将贴纸添加到 com.gbwhatsapp,我不想看到带有消息的复杂操作

我尝试更改操作和许多事情,但应用程序崩溃

添加贴纸的动作是:

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】:

    您可以添加对Intent.setPackage 的呼叫。例如

    const-string v1, "com.gbwhatsapp"
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-01
      • 1970-01-01
      相关资源
      最近更新 更多