android - 我如何为应用操作设置特定包(应用)
问题描述
你好,有一个应用程序可以将贴纸添加到 whatsapp。
并且有 3 个版本的 whatsapp 具有不同的包名称
com.whatsapp
com.gbwhatsapp
com.gbwhatsapp3
我希望我的应用贴纸仅将贴纸添加到 com.gbwhatsapp 并且我不想看到带有消息的复杂操作
我试图改变动作和许多事情,但应用程序崩溃了
添加贴纸的操作是:
com.whatsapp.intent.action.ENABLE_STICKER_PACK
贴纸应用程序中的代码是
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
解决方案
您可以向Intent.setPackage
. 例如
const-string v1, "com.gbwhatsapp"
invoke-virtual {v0, v1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
推荐阅读
- qt - 如何告诉 qmake 为共享库使用 .dll.a 后缀
- python - 如何在散景绘图中为“extra_y_ranges”放置列表而不是范围
- excel - 将特定工作表从工作簿复制到另一个工作簿,不包括宏
- python - Django 在查询集结果上添加附加字段
- objective-c - EXC_BAD_ACCESS on VNSequenceRequestHandler
- android - Android Annotation Processor: Invoke annotated method with a condition
- javascript - React Route and Switch is not working. The path renders nothing
- laravel - 无法猜测 MIME 类型,因为没有可用的猜测器。如何在 cPanel 中安装 php_fileinfo 扩展?
- reactjs - 用户登录时更改导航栏
- email - Configure postfix with inbound authentication