That's good news. Thanks for the quick response. Here is a follow on... Would the resulting execution of my broadcast receiver from the AlarmManager broadcast go into the background thread pool or get into the foreground inheriting from the AlarmManager? I'm relieved to know that a system service will not starve and now I want to know if onReceive is sure to get all the CPU time it needs.
On Oct 30, 5:51 am, Dianne Hackborn <[email protected]> wrote: > No, the alarm manager does not run at the background priority, and when > delivering an intent broadcast to an application it is actually pulled into > the foreground scheduling class (else there would often be ANRs and such). > > > > > > On Thu, Oct 29, 2009 at 11:31 PM, Beth <[email protected]> wrote: > > > I have a question about the background thread handling change that > > went into SDK 1.6. I read here that BG threads get placed in a > > scheduling class that can't use more than 5-10% of the CPU in order to > > keep the foreground responsive. Do system services get into that > > scheduling class? > > > My app uses repeating alarms. It was great with 1.5, very reliable. > > Since the upgrade to 1.6, the phone seems to be dropping some of my > > repeating broadcasts, especially if I am doing something fun in the > > foreground like with WIFI when the Alarm is supposed to fire. I do > > not have any of the task killer programs that have been a hot topic > > lately. To be clear, the dropped alarm broadcast behavior is > > intermittent. I am not 100% sure if I really am doing something when > > it has failed. If the timer is a one shot, it seems to work better > > but there is no real empirical evidence here. My phone is usually in > > my pocket when I fire one of the one shot alarms. If my theory about > > system services in the background scheduling class is correct, then I > > probably cannot find a workaround or defensively code a solution. > > Will it be the same in 2.0? > > > Have others seen issues with alarms and with the setRepeating method? > > I am looking for suggestions to troubleshoot this problem. How can I > > determine if the problem is the broadcast, if it is the repeating > > alarm creation, or if there is some other issue like low memory coming > > in to > > play. Any ideas? > > > Thanks and regards, > > Beth > > -- > 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 -~----------~----~----~----~------~----~------~--~---

