My application do a repeating request each second - asking the server for a new data, and if there is such - it wakes up the device and run the main application. ( this is by the request from the users, and they does not care about the battery usage, it is mandatory to run each second. ) ( any changes to the settings which could help is allowed by the user )
I am curently trying to achieve this by using either AlarmManager or System.Threading.Timer ( tried with both ), but each time I am ending up with the follow issue :
- The device stop requesting the server at some point while it is slept and at some look-like random time it restore it's work for a short. Why this happens, and how to fix this issue ?
( OS : Android 5.x )
Aucun commentaire:
Enregistrer un commentaire