March 2nd, 2010, 12:07 PM
|
#1 (permalink)
|
|
Junior Member
Join Date: Feb 2010
Location: Dublin
Posts: 16
Device(s):
Thanks: 2
Thanked 0 Times in 0 Posts
|
What class to use to run endless task on Android device
I am working on some Android project.
Apart from main Activity (user interface) I have a requirement to endlessly run an important TASK (in background) that every 30 seconds calls REST service to check for new data.
In case there are any new data the TASK has to notify about this fact the Activity.
This TASK needs to run even when the Activity was for instance moved to background and finished as a result of lack of device’s resources.
Initially I chose the TASK to be a class extending Service (as this is a class recommended for background work), but is there anything better (more reliable) for my requirements?
People generally don’t recommend Service for long-running tasks/services.
Thanks in advance!
|
|
|