The goal is to start the Alarm after reboot, but it does not start.

System Process issues this

10-24 13:16:04.460 477-487/system_process W/BroadcastQueue: Permission Denial: receiving Intent { act=android.intent.action.BOOT_COMPLETED flg=0x10 (has extras) } to com.xxxx.yyyy.project/.StartAtBoot requires android.permission.RECEIVE_BOOT_COMPLETED due to sender null (uid 1000) 

Manifest

 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <receiver android:name=".StartAtBoot" android:enabled="true" android:exported="true" > <intent-filter > <action android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver> 

StartAtBoot

 @Override public void onReceive(Context context, Intent intent) { AlarmManager am= (AlarmManager)context.getSystemService(Context.ALARM_SERVICE); if("android.intent.action.BOOT_COMPLETED".equalsIgnoreCase(intent.getAction())){ Intent i= new Intent(context, Receiver.class); PendingIntent pIntent2 = PendingIntent.getBroadcast(context, 0, i, 0); am.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + 10000, 10800000, pIntent2); System.out.println("BOOT_COMPLETED WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); } } 

Receiver

 public void onReceive(Context ctx, Intent intent) { System.out.println("BOOT_COMPLETED WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); } 
  • On which line. Full Stack Trace - Flippy
  • Full stack trace? - T.Tester
  • Well, yes, provide a full log. Or skip the line on which the error occurs - Flippy
  • I can only drop the full System Process log, but it will not do anything, there is one line to relate to, which I dropped, the activation itself is not running after the reboot, so there are no errors from there. - T.Tester
  • Do you have version 6 of the axis behaving this way? What if this permission needs to be registered in runtime? - Yuriy SPb

0