【问题标题】:How to test PACKAGE_REPLACED event如何测试 PACKAGE_REPLACED 事件
【发布时间】:2013-04-30 13:18:17
【问题描述】:

我正在尝试捕获 .PACKAGE_REPLACED 事件以查看我的代码是否运行良好,但我无法模拟它。我尝试使用 adb shell 命令:

am broadcast -a android.intent.action.PACKAGE_REPLACED -n com.draoid/.com.draoid.installationtracking.nnn.InstallTracking --es "package_replaced" "utm_source=test_source&utm_medium=test_medium&utm_term=test_term&utm_content=test_content&utm_campaign=test_name"

但什么也没发生

【问题讨论】:

    标签: android google-play android-market-filtering


    【解决方案1】:

    那个Intent是受保护的,只能由系统自己发送。然而,如果你 使用

    重新安装您的应用
    adb install -r yourapp.apk
    

    这应该会生成PACKAGE_REPLACED 广播。

    【讨论】:

      猜你喜欢
      • 2017-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-22
      相关资源
      最近更新 更多