Broadcast receiver, check a checkbox preference state on bootup then send a notification

不羁的心 提交于 2019-12-02 09:52:05

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.

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!