Home > DeveloperSection > Forums > Alarmmanager fire on every time in android
Alex Leblois
Alex Leblois

Total Post:67

Points:471
Posted on    November-07-2014 1:41 AM

 Android Java 
Ratings:


 1 Reply(s)
 696  View(s)
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(...);
}


Tom Cruser
Tom Cruser

Total Post:28

Points:196
Posted on    November-07-2014 3:16 AM

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

Don't want to miss updates? Please click the below button!

Follow MindStick