Hello,
I am using Paho MQTT Android service on a Kitkat device. I
noticed that sometimes AlarmManager notification does not
happen and this leads to disconnection. After searching the
reason for this, I found this note in the Android
documentation:
Beginning in API 19, the
trigger time passed to this method is treated as inexact:
the alarm will not be delivered before this time, but may
be deferred and delivered some time later. The OS will use
this policy in order to "batch" alarms together across the
entire system, minimizing the number of times the device
needs to "wake up" and minimizing battery use.
There are two alternates to solve this issue; either use
setExact or setWindow function to schedule the alarm. In order
to use either of these functions, the minimum API needed is
19.
When compiling Paho Java and Android service based on Maven
commands mentioned below, it always uses API 16:
My questions:
1) Is there a plan to support API 19 or later for the Paho
Android service?
2) Is there a plan to change the AlarmManager call from set
to setWindow? I will be happy to help with this task.
Thanks