I am currently working on a reminder app and the BootReceiver is not executed when the Huawei device is rebooted. I have tested the app in other android devices and it works perfectly, except for Huawei specific devices. I have tried the following.
Manifest file
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.WAKE_LOCK"/> <receiver android:name=".BootService" android:enabled="true" android:exported="true"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.REBOOT" /> <action android:name="android.intent.action.QUICKBOOT_POWERON"/> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </receiver> BootService class
public class BootService extends BroadcastReceiver { private static final String TAG = "BootService Lumea"; @Override public void onReceive(Context context, Intent intent) { Log.d(TAG, "Boot Completed Received: " + intent); Toast.makeText(context, "Boot Completed Received", Toast.LENGTH_SHORT).show(); } } Would be really helpful if you guys can help me find a solution for the same.