문제

I'm trying to catch .PACKAGE_REPLACED event in order to see if my code runs good, however I can't simulate it. I tried using adb shell command:

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"

but nothing happens

도움이 되었습니까?

해결책

That Intent is protected and can only be sent by the system itself. However, if you reinstall your app using

adb install -r yourapp.apk

This should generate the PACKAGE_REPLACED broadcast.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top