Alarmmanager fire on every time in android

Total Post:67

Points:471
Java 
 1481  View(s)
Ratings:
Rate this:

 Alarmmanager fire on every time in android

Like @mighter said, API >= 19 if you must use exact timing, use the setExact() API.

if(android.os.Build.VERSION.SDK_INT < 19) {
    alarmManager.setRepeating(AlarmManager.RTC, utcMillisNextMin(), 60000, createClockTickIntent(_context));
} else {
    alarmManager.setExact(...);
}
  1. Post:28

    Points:196
    Re: Alarmmanager fire on every time in android

    if you must use exact timing, use the setExact() API.

    if(android.os.Build.VERSION.SDK_INT < 19) {
        alarmManager.setRepeating(AlarmManager.RTC, utcMillisNextMin(), 60000, createClockTickIntent(_context));
    } else {
        alarmManager.setExact(...);
    }

      Modified On Apr-06-2018 05:04:53 AM

Answer