Here is a related question. Are there other reasons to say the Alarm
service is unreliable?
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. I do not have any task killer programs, or at
least I did not knowingly install any.
Notice that I use unique requestCodes in the creation of my
PendingIntent (children.getInt(0) in the code snippet below) to insure
that the correct number of distinct alarms is created and to cancel
any of those alarms at a later point in time, should that become
necessary. Has the use of the requestCode parameter changed with the
1.6 SDK?
almMgr.setRepeating (AlarmManager.RTC_WAKEUP,
cal.getTimeInMillis(),
SchedulerActivity.WEEKINMILLIS,
PendingIntent.getBroadcast(ctxt,
children.getInt(0), new Intent(ctxt, SoundOffTimer.class),
PendingIntent.FLAG_UPDATE_CURRENT));
children.moveToNext();
The dropped broadcast behavior is intermittent. When the timer is a
one shot, it seems to work correctly. I am wondering if others on the
list have seen issues with the setRepeating method. I am also looking
for suggestions for troubleshooting 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
On Oct 23, 6:15 pm, Dianne Hackborn <[email protected]> wrote:
> On Fri, Oct 23, 2009 at 6:16 AM, String <[email protected]>wrote:
>
> > I'm already using alarms to drive my widget updates. Problem is,
> > alarms are unreliable, especially with the proliferation of task
> > killer apps which abuse the API (see
>
> >http://groups.google.com/group/android-developers/browse_thread/threa...
> > ).
> > People have these running in the background, then I get complaints
> > that my clock has stopped.
>
> Well the underlying problem there is these #$#$#!! apps abusing that API.
>
> I so regret having made that available. I should have realized it was a bad
> idea, because it violates a very basic tenant: one application should not be
> able to disrupt the behavior of another.
>
> Anyway, if possible it would be great if you chould tell your users that
> their task killer app is causing their problems. And it's not going to just
> cause problems with alarms: it will unpost any notifications you have, stop
> services you have running, etc.
>
> --
> 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
-~----------~----~----~----~------~----~------~--~---