I have developed my android alarm app which need to something every hour(like 1pm, 2pm, 3pm ,4pm ,5pm ,6pm etc).
Now am using alarmManager so that I get a broadCast event every hour.But sometimes the event is delayed.
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
Log.d(Constants.APP_TAG, "setting beep alarm");
PendingIntent pendingIntent = PendingIntent.getBroadcast( context, 0, new Intent("com.mindedges.beephourly.intent.action.NEW_HOUR"),PendingIntent.FLAG_UPDATE_CURRENT );
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, AlarmSheduleHelper.getImmediateNextHour().getTimeInMillis(),AlarmManager.INTERVAL_HOUR, pendingIntent);
How can I make sure that I get broadcast event exactly on time.
PS: It gets delayed on some specific phones/anroid version