ALARMMANAGER FIRE ON EVERY TIME IN ANDROID

Alex Leblois

Total Post:67

Points:471
Posted by  Alex Leblois
Java 
 1105  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. Tom Cruser

    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(...);
    }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!