Boot receiver not working for my Samsung GT-S7852

I have a problem with the BroadcastReceiver boot receiver. The broadcast receiver does not start after loading the phone, for example. Reboot your phone or regular start phone. Usually I want to start the service after starting this.

My Menifest.xml is as follows:

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <application android:name="MY_PACKAGE_NAME.MyCustomApplicationClass"> <receiver android:name="MY_PACKAGE_NAME.BootStartUpReciever" android:enabled="true" android:exported="true" > <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.QUICKBOOT_POWERON" /> </intent-filter> </receiver> </application> 

My BroadcastReceiver is as follows:

  public class BootStartUpReciever extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { Toast.makeText(context, "Boot Completed Succesfully", Toast.LENGTH_SHORT).show(); } } 

Notes :

  • This process works on my Samsung Galaxy SM-T235Y Tab4 , but does not work on the Samsung GT-S7852 .
  • My application has launch activity.
  • My application is installed in the internal memory
  • Initialize all things in MyCustomApplicationClass.java class
  • I just want to start the background service after the phone has finished loading.
  • In this SCENARIO, he is just starting to work only with the background service, without opening any actions.

I already read some topics related to this problem. Unfortunately, none of them worked for me. These topics are:

Sorry for the bad english.

0
source share

Source: https://habr.com/ru/post/1487517/


All Articles