lgxace / rcsjta

Automatically exported from code.google.com/p/rcsjta
0 stars 0 forks source link

Timer mechanism not suitable for Android #78

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The NIST SIP stack part makes use of Java Timer and its schedule method. 
Unfortunately, timers in Android may not be executed on time if device is 
sleeping.
I think we do have three options:
a) change from Timer to AlarmManager which would result in a massiv 
reconstruction
b) set wakelocks for the time any recuring timer is active which may drain the 
battery
c) mitigate the impact for a recurring timer by checking with every tick 
whether the overarching timer is still valid or already exceeded. In the later 
case: fire the timeout event "immediately" and forget about the remaining ticks.

Original issue reported on code.google.com by andreas-...@telekom.de on 18 Nov 2014 at 1:00

GoogleCodeExporter commented 9 years ago

Original comment by jmauffret@gmail.com on 18 Nov 2014 at 2:09

GoogleCodeExporter commented 9 years ago
New branch issue-078 with fix pushed; please let me know when I should merge

Original comment by andreas-...@telekom.de on 20 Nov 2014 at 9:23