eclipse - 我可以指定通过 ADB 发送的意图吗?

标签 eclipse debugging android-intent adb

我正在开发一个应用程序,该应用程序旨在(仅)从另一个在意图中提供额外功能的应用程序启动。因此,此应用程序不在其 Intent 过滤器中使用 LAUNCHER 类别,并且当我从 Eclipse 启动它时,不会启动并附加到调试器。

调试与启动或 Intent 相关的任何内容都非常困难,因为我只能通过将 LAUNCHER 类别添加到 list 中来进行调试,从而绕过启动事件的预期方法,而不需要必要的额外功能。有什么方法可以指定 ADB 发送的启动意图以包含额外的数据吗?

最佳答案

当面临类似的挑战时,我能够通过切换到 URI 形式来为我尝试发送的广播提供额外内容:

am broadcast "intent:#Intent;action=android.intent.action.AIRPLANE_MODE;B.state=true;end"

关于eclipse - 我可以指定通过 ADB 发送的意图吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13480827/

相关文章:

java - 是否可以在 Enterprise Architect 中自动安排类(class)?

c# - 在 ASP.NET 应用程序中使用 System.Diagnostics.Debug

java - Intent Activity 切换到随机 Activity

java - 从 Eclipse 中的 git 导入后,出现错误 "source folder is not java project"

java - 如何让 Java 识别用户输入中的空格?

java - 如何在 Eclipse 中设置主要 Java 类型?

android - IntelliJ 在调试 android 应用程序时不会在断点处停止

c# - DebuggerStepThrough 是否可以继承到自动生成的 IEnumerable 实现中?

android - 如何在 android studio 中集成最新的 Google play 服务

android - MainActivity 的默认 Intent 过滤器是什么意思?