Wednesday 29 August 2012

How To Test Broadcast Receiver In Emulator

To Send Broadcast from CMD you can use this Command.
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -c android.intent.category.HOME -n package_name/class_name

You can test your application having any kind of broadcast receiver, the emulator will get the broadcast according the Action passed with the above command.