I know this thread is talking a lot about task management.  I think
the original post was about making alarms that still occur even if the
app is closed.  This is how I do it:

1) Use AlarmManager service to schedule PendingIntents in the future
(I.e. xx min from now)

2) Creat an intent/PendingIntent pair that starts. Your service when
called, and give that to AlarmManager with your polling interval.

3) If you need to save data that your service needs when it is started
so it can continue where it left off before it was destroyed, use a
preferneces file (see SharedPreferences class)

Using that approach works great for my app.  That way it doesn't
matter if my app ever gets killed.  The alarm will trigger in the
future and the intent will restart my service, and I just reload my
preferences file to restore some data I'm working with.

Hope that helps.

On Oct 14, 12:58 am, Dianne Hackborn <[email protected]> wrote:
> On Tue, Oct 13, 2009 at 9:09 PM, EboMike <[email protected]> wrote:
> > Task killers aside, what about if the OS decides to stop a process
> > because memory is low?
>
> It doesn't do what these apps are doing.  As I said, what these apps are
> doing (especially the ones that do this stuff behind the user's back) is
> abusing an API that is not intended to be used this way.
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~---------~--~----~------------~-------~--~----~
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