I have a alarm manager that call a particular service after every 1 minute which do some calculations and send a broadcast to broadcast receiver. I have done this using alarm manager setRepeating().
Here it my code:
Alarm manager:
Intent serviceIntent = new Intent(this, PrayerNotifyService.class);
PendingIntent pintent = PendingIntent.getService(this, 0, serviceIntent, 0);
AlarmManager alarm = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
alarm.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), 60000, pintent);
It works fine but after rebooting a mobile phone, alarm manager not calling the service.
I have searched on internet and found some solutions like below but they didn't worked for me.
i have also give Boot Complete permission
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
My Receiver in Manifest:
<receiver
android:name=".NotificationReceiver"
android:enabled="true"
android:exported="true" >
<action android:name="android.intent.action.BOOT_COMPLETED" />
</receiver>
Can any one tell me how to solve this issue?