Not sure why you use a "static" PendingIntent - if it's for optimization
reasons, that's really not necessary. I wonder if that, by itself, could
cause the behavior you're describing.
You can use "dumpsys alarm" in adb shell to see the actual alarms set in
the system, and verify that your code has the effects it's supposed to have.
-- Kostya
23.10.2011 15:08, John Goche ?????:
Thank you for your reply but cal.getTimeInMillis() returns the right
thing. It has been
suggested before that this might be returning the wrong value but
whenever I attach
my device via USB cable I always see all alarms being set as you can
see one of them
below (others omitted). I regret that I cannot see the timestamp on
the logcat output (where
is the date and time)? How long does the logcat go back in time? I
need to disconnect the
device and then look at the logcat several hours later when an alarm
is missed, but with no
timestamp it is a little difficult to go back to the place in the log
where the messages were
supposed to be and debug. Could it be that my LG Optimus Net is one of
few devices where
the alarm does not worked as advertised in the API? What other devices
may have this same
problem?
Thanks,
John Goche
D/AlarmExpired(22715): <!>com.fobar.app.AlarmExpiredActivity 35<!>
Calling alarm setter...
D/AlarmSetter(22715): <!>com.fobar.app.AlarmSetter 2459<!>
doSetupAlarm called.
D/AlarmSetter(22715): <!>com.fobar.app.AlarmSetter 2470<!>
groupsDateTimes.size() is : 1
I/doSetupAlarm(22715): <!>com.fobar.app.AlarmSetter 2506<!> Setting
alarm for group: ???????
D/AlarmSetter(22715): <!>com.fobar.app.AlarmSetter 2528<!> Cancelling
alarm...
D/AlarmSetter(22715): <!>com.fobar.app.AlarmSetter 2532<!> Done
cancelling alarm.
D/AlarmSetter(22715): <!>com.fobar.app.AlarmSetter 2549<!> Setting
alarm...
D/AlarmSetter(22715): <!>com.fobar.app.AlarmSetter 2559<!> Done
setting alarm.
On Sun, Oct 23, 2011 at 12:03 PM, Ali Chousein <ali.chous...@gmail.com
<mailto:ali.chous...@gmail.com>> wrote:
What does cal.getTimeInMillis() in the following statement return?
Maybe the problem is there.
alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),
pendingIntent);
I use the following statement while setting alarms:
this.am.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
SystemClock.elapsedRealtime()+tOffset, pendingIntent);
where SystemClock.elapsedRealtime() is the elapsed time in
milliseconds since the system was booted, including deep sleep.
"tOffset" is the milliseconds which should elapse before the alarm is
fired.
-------------------------------------------------
Ali Chousein
Weather-Buddy
http://weatherbuddy.blogspot.com/ | http://twitter.com/weather_buddy
Geo-Filtered <http://twitter.com/weather_buddy%0AGeo-Filtered>
Assistant
http://geo-filtered-assistant.blogspot.com/
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
android-developers@googlegroups.com
<mailto:android-developers@googlegroups.com>
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
<mailto:android-developers%2bunsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
Kostya Vasilyev
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en