Sergio,

A Handler only works for as long as your process is "alive", which may not
be a good thing.

Use AlarmManager for scheduling - it can wake the phone up (if you need
this) and will reload the process if it was kicked out of memory.

For the actual updates, take a look at IntentService (part of SDK) or
WakefulIntentService (Mark Murphy's enhanced version, Google for it).

-- Kostya


2011/1/17 Sergio Luceno <slucen...@gmail.com>

> Hi!
>
> My application has to be syncronized every 5 minutes against a server.
> I have to schedule a HTTP call to my server to get sync.
>
> What is the best way to achieve that?
>
> Now I tried to make a timer with a handler.
> I'm passing a message every 5 minutes to execute my action.
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Reply via email to