Boot Complete Is Not Working In Android (redmi)
I am currently working on a application which includes Boot_Completed Broadcast receiver concept. I have tested this app in my Motorola Moto G Phone. The app runs fine and shows th
Solution 1:
in case of XIOMI devices you have to manually set permission, i think you can solve this by adding your app in "auto-start management" list, which is available as default security app.
Solution 2:
This is solution for your bug.
What you need to do is that , you need to mention this permission also in your Intent-Filter.
<receiverandroid:name="com.example.demoapp.MyReceiver"android:enabled="true"android:exported="true" ><intent-filter ><actionandroid:name="android.intent.action.BOOT_COMPLETED"/><actionandroid:name="android.intent.action.REBOOT"/></intent-filter></receiver>
Here you need to do one thing also.
Go to "Settings-Apps_open your app info-Manage permisson" in yourdevice
Here check all things here.
Because for some devices it will not work. Ex.Red mi
Try this !
Solution 3:
Go to manage app permission
Select your app from apps
toggle "Auto-Start"
done
Solution 4:
try removing if condition from broadcast reciever
publicclassMyReceiverextendsBroadcastReceiver {
@OverridepublicvoidonReceive(Context context, Intent intent) {
Toast.makeText(context, "Boot Complete.", Toast.LENGTH_LONG).show();
}
}
Post a Comment for "Boot Complete Is Not Working In Android (redmi)"