I have a broadcast receiver registered in the application manifest to receive the BOOT_COMPLETED notification. After restarting the mobile device I receive no notification. However, I do receive the notification when I open my application. Please assist.
Receive boot completed permission from my manifest:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
Receiver from my manifest:
<receiver android:name=".BootCompletedReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
BootCompletedReceiver class:
public class BootCompletedReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Toast.makeText(context, "Boot Completed Received", Toast.LENGTH_LONG).show();
}