Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test android.intent.action.MY_PACKAGE_REPLACED

I'd like to be able to test the BroadcastReceiver for MY_PACKAGE_REPLACED.

Can I accomplish this with an adb command?

Does the emulator accomplish this when I launch an app from the IDE (Android studio)?

like image 413
dols Avatar asked Dec 01 '14 21:12

dols


1 Answers

Unfortunately the previously proposed solution is not supported on Android 7.0+ because only the system is allowed to broadcast it.

However the intent can be stimulated by adb install -r command when side loading the app.

I don't take credit for this answer as it has been submitted in another thread.

like image 96
nesluk Avatar answered Sep 21 '22 13:09

nesluk