How do I know if the broadcast event is working?

728 Views Asked by At

I am not running this on an emulator, but an actual Android Device (Google Pixel 3).

If I issue this command: am broadcast -a android.intent.action.BOOT_COMPLETED

I get the output :

> Broadcasting: Intent { act=android.intent.action.BOOT_COMPLETED
> flg=0x400000 } Broadcast completed: result=0

I was expecting the device to reboot. Does this mean that the broadcast isn't working?

1

There are 1 best solutions below

5
CommonsWare On

I was expecting the device to reboot.

That broadcast does not reboot the device. It is a broadcast, sent by the system, after the device has booted.