guich wrote:
> What i was thinking to do was to write a service that was
> automatically started and just keep running in the background, even
> with no other intents alive. So, it would be a service-only
> application; no user interface at all. It would run and, from time to
> time, connect to a server, download data, and sleep again.

Please read:

http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-are-not/

and:

http://www.androidguys.com/2009/12/07/code-pollution-boot-time-services/

Also, bear in mind that users can stop your service whenever they wish,
via the Settings > Applications > Manage Services screen or via a
so-called "task killer" application. In fact, those task killers --
generally a big pain to Android developers -- were written specifically
to allow users to kill off ever-running services like you propose.

Please, use AlarmManager for scheduled tasks. It's why it's there.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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