AlarmManager repeating alarm missing randomly when phone is not in use

前端 未结 3 2014
南旧
南旧 2021-02-05 22:24

I am calling a background Service at interval of 30 min to read the latitude/longitude of current location and sending it to server by POST API .

I am using

3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-05 23:09

    As per Android developer document Note:

    Note: as of API 19, all repeating alarms are inexact. If your application needs precise delivery times then it must use one-time exact alarms, rescheduling each time as described above. Legacy applications whose targetSdkVersion is earlier than API 19 will continue to have all of their alarms, including repeating alarms, treated as exact.

提交回复
热议问题