Skip to content Skip to sidebar Skip to footer

Broadcast Receiver, Check A Checkbox Preference State On Bootup Then Send A Notification

My problem is that when I try to read a checkbox preference state from a different activity on bootup then send a status bar notification. Then when the device boots the I get a fo

Solution 1:

According to log ('java.lang.RuntimeException: Unable to instantiate receiver'), system is unable to create instance of your receiver class, because system is unable to find specified class (com.brandon.labs.nsettings.receivers.notifyBootup). I think it is probably problems with name (of receiver class) in your AndroidManifest.xml file, and it is not related to preferences.

In future, if you will get another exception, i recommend you to read carefully message of exception ;) and stack trace. Usually they contains the half of answer to your question. And for popular mistakes - you can try to type exception text into Google (excluding some specific info such as name of class), and you will find solution very fast.

Solution 2:

Have you added the following to your AndroidManifest.xml along with registering the BroadcastReceiver??

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

Post a Comment for "Broadcast Receiver, Check A Checkbox Preference State On Bootup Then Send A Notification"