If you are writing a context provider also, maybe implementing a
SyncAdapter will be the best option for you?
There is also AlarmManager.

Creating and managing your threads for that purpose just seems not
quite right in a mobile environment.(For me, at least)

http://developer.android.com/intl/de/reference/android/content/AbstractThreadedSyncAdapter.html
http://developer.android.com/intl/de/reference/android/app/AlarmManager.html

On 14 янв, 01:37, Tobiah <[email protected]> wrote:
> I need to launch a thread that will periodically look at the
> database to see whether records need to be synced to a remote server;
> I need the requests to the server to happen in the backgound.
> If this thread just spins away without being checked, won't the
> cpu be tanked?  Should I put some sort of 'sleep' in the thread
> so that it only runs every so often?
>
> Thanks,
>
> Tobiah

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to