On Tue, Jul 27, 2010 at 1:31 PM, Tommy <[email protected]> wrote:

> Does anyone have any idea as to why this might be stopping at some point?
>

A service can be killed at any point by the system to conserve memory.


> Are there any tips on creating long running services like this or am I
> doing anything wrong in my process?
>

You can help keep your service alive longer by making it foreground and
showing a notification, but even that is not bullet proof. Always assume
your service will be killed at any point - because it can and probably will,
eventually.

That being said, if you set an alarm to re-trigger the Service on each
start, it should keep going, theoretically. I don't suppose you're turning
your phone off? Because all alarms are lost if you do.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

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