Since the phone restarts and thus gets disconnected from the Eclipse debugger/LogCat while it\'s booting up, how do I see where my boot complete broadcast receiver is crashing?<
Just put to your terminal in Android Studio
adb shell am broadcast -a android.intent.action.BOOT_COMPLETE
As i wrote on another thread:
You can emulate all broadcast actions by connecting via adb to the device and open a device shell.
Here we go:
In this way you should be able to debug.
There are a bunch of nice commands coming with adb or the adb shell. Just try it
Regards Flo
EDIT:
Using the above method will also reboot the device. To prevent the device from rebooting use am broadcast -a android.intent.action.BOOT_COMPLETED com.example.app
. Note the suffix with the application package name to which the broadcast goes. This enables you to send the BOOT_COMPLETED intent to ONLY YOUR app for debugging purposes. – Roel van Uden
check your Intent's actions and bundles you are recieving ,they may null and can be a null pointer exception.
The receiver is only controlling when your code runs (i.e when the phone starts). Whilst debugging, run the code manually. You can resolve 99% of your issues this way and the remaining ones (if any) you can resolve by writing to LogCat so see what your code is doing.