Re: [android-beginners] Re: alarm manager confusion

2009-11-02 Thread Jeffrey Blattman
hmmm. i'd suggest not killing any processes. the problem would be if under normal OS usage, the alarm is not activated. i can't say i understand exactly how the OS handles alarms, but perhaps forcefully killing processes interrupts it's workings. On 10/30/09 4:04 AM, marc wrote: > jeffrey, how

[android-beginners] Re: alarm manager confusion

2009-11-02 Thread marc
jeffrey, how did you solve the problem? i made a own process for the broadcastreceiver (as said in the linked theme), so i have 2 processes now: cycle: 1. user starts application 2. user schedules the alarm in the application current processes: - application 3. scheduled alarm expires, broadcastr

[android-beginners] Re: alarm manager confusion

2009-11-02 Thread marc
jeffrey, how did you solve the problem? i made a own process for the broadcastreceiver (as said in the linked theme), so i have 2 processes now: cycle: 1. user starts application 2. user schedules the alarm in the application current processes: - application 3. scheduled alarm expires first time,

[android-beginners] Re: alarm manager confusion

2009-09-12 Thread Jeffrey Blattman
well, i found this, http://code.google.com/p/android/issues/detail?id=2886 works for me now. On 9/12/09 2:00 PM, Mark Murphy wrote: Jeffrey Blattman wrote: mark, "perhaps some sort of service" is a little vague. Generally speaking, if your manifest-registered Broadcas

[android-beginners] Re: alarm manager confusion

2009-09-12 Thread Mark Murphy
Jeffrey Blattman wrote: > mark, "perhaps some sort of service" is a little vague. Generally speaking, if your manifest-registered BroadcastReceiver will be doing things that are short (say, under a second), you won't need one -- just do all your work in the BroadcastReceiver. If you are going to

[android-beginners] Re: alarm manager confusion

2009-09-12 Thread Jeffrey Blattman
mark, "perhaps some sort of service" is a little vague. the AM schedules an alarm that calls a receiver that does three things, 1. updates some data that is shared with the activity 2. sends notifications 3. broadcasts back to another receiver that updates the activity, if it's running (the a

[android-beginners] Re: alarm manager confusion

2009-09-12 Thread Mark Murphy
Jeffrey Blattman wrote: > as i noted i'm using alarm mgr + broadcast receiver. my activity > schedules the alarm. if the activity is destroyed (off the stack, not > just in the background), i don't get the alarms. Correct. As I wrote: "If you have a running activity, but you want scheduled alarm

[android-beginners] Re: alarm manager confusion

2009-09-12 Thread Jeffrey Blattman
as i noted i'm using alarm mgr + broadcast receiver. my activity schedules the alarm. if the activity is destroyed (off the stack, not just in the background), i don't get the alarms. On 9/12/09 1:08 PM, Mark Murphy wrote: Mark Murphy wrote: There is no reason to use AlarmManager

[android-beginners] Re: alarm manager confusion

2009-09-12 Thread Mark Murphy
Mark Murphy wrote: > There is no reason to use AlarmManager for an activity, and I would not > expect AlarmManager to behave very well for an activity. To clarify: if you have a running activity, and you want the activity to do things on a periodic basis, either use Timer/TimerTask (like an ordin

[android-beginners] Re: alarm manager confusion

2009-09-12 Thread Mark Murphy
Jeffrey Blattman wrote: > as far as i can tell, scheduled alarms are only executed if the app that > scheduled them is active. That is not true. The code I gave you demonstrates that. > in your example, you start a service that never quits obviously. Sure it does. My service inherits from Inte

[android-beginners] Re: alarm manager confusion

2009-09-12 Thread Jeffrey Blattman
thanks mark. as far as i can tell, scheduled alarms are only executed if the app that scheduled them is active. in your example, you start a service that never quits obviously. so the app is active forever, in an ideal world anyway. i suspect you'd see the same behavior if you stopped your se

[android-beginners] Re: alarm manager confusion

2009-09-12 Thread Mark Murphy
Jeffrey Blattman wrote: > i want to schedule a repeating task. i start my app, and register with > alarm manager (repeating). all is fine, as long as my app is in memory. > if i for example press back to remove my app from the stack, i no longer > receive alarms. same thing if i manually kill the