Task Managers are (unfortunately) here to stay.  Many, many people
tell me that the Verizon reps are recommending ATK as the first thing
a user downloads.  This is definitely bad advice, but very prevalent.
I do my best to steer my friends differently, but they usually trust
the Verizon rep (hourly worker, not especially well versed in the
Android OS), over me (professional developer, with Apps in the Market,
and 1+ years actively developing, and learning the intricacies of the
OS).

---------------
I don't have a direct answer to your question, but a workaround.

You can ensure that your Service is restarted if it is stopped (by an
over zealous user), and create new alarms when it happens.  I
typically do this, by registering a BroadcastReceiver to act on the
BOOT_COMPLETED event.  You can register for other system events also
(for instance do something when the user unlocks their phone).  The
Broadcast receiver can restart your service, and re-schedule the
alarms.  Warning, becoming too aggressive with restarting your app,
could easily be perceived negatively by users.

I have been struggling with the same sort of problems with the
AlarmManager.  I would like a way to schedule an alarm outside of a
Service or Activity, so regardless of if a process is manually killed
by a user the event still occurs (bottom line, I am in full agreement
with your desire).  Another reason I want this, is that my app always
resides in memory, even though it only does something once a day -
there is no reason it should be using system resources the other 23
hours and 55 minutes a day.

Tying an AlarmManager event to a Service, also has the side effect
that alarms aren't always triggered reliably (if a Service is taken
out of context by the container, it will sometimes trigger an alarm -
especially if there is an alarm that was supposed to occur when the
Service was out of context).

I am very interested in a discussion of the proper architecture for
creating a low impact Alarm service, that is reliable, and robust.

On Jun 12, 6:05 pm, Giuseppe Palmeri <g.palm...@yahoo.it> wrote:
> I noticed that using TaskManager (or similar applications) and killing my 
> application, it cancels events scheduled through AlarmManager of Android OS.
> There are no process.
> Nothing to kill.
> Schedules are just canceled.
>
> Does anyone know how to prevent this?

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

Reply via email to