1

I wrote a service to call pending intent after 1 minute

code:

AlarmManager alarms = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
                    alarms.setRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),
                            60 * 1000, pendingIntent);

this code works properly on all devices except samsung j5.Where it calls service after 5 minutes.

Please let me know what could be the possible reason for this issue.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
PriyankaK
  • 11
  • 1
  • See http://stackoverflow.com/questions/37577296/weird-alarmmanager-behaviour/37677048#37677048 On most newer devices you cannot set repeating alarms reliably. Especially low-end devices have severe restrictions on alarms to save battery life. For short intervals you are better off posting `Runnable` to a `Handler`. – David Wasser Oct 26 '16 at 06:24

0 Answers0