My android app has a ContentProvider
and stores data (strings) in a SQLite table
These rows need to eb sent up to an internet server
I want this data to be uploaded in the background when the remote host is available (WiFi on for instance)
The data should be sent asap (when network available of course) without interfering with my app's ui It should send even when my app does not have the main focus (user may be sms-ing or using the camera)
New data could be added to the table (out queue) every 5 seconds
Q: Should I use a background service to send the unsent rows?
It seems too frequent to use the "Alarm Service", but I could be wrong
Battery life is my main concern, but secondly is that it needs to send as soon as possible (or shortly after internet available)
Android Studio targeting API 17+