Hi there,

Both as an exercise and because I've not yet found a simple app that
does this already, I'm trying to develop a widget that displays the
next alarm set by the standard Alarm Clock application.

I've found that you can get an already formatted String of this time
using:

Settings.System.getString(getContentResolver(),
Settings.System.NEXT_ALARM_FORMATTED);

but I have a few problems with this:

1. The String it returns is already formatted, but in a way I don't
want. So, I'd have to do some rather nasty String splits and
manipulations to reformat it how I want. Ideally I'd like to get this
time in millis/seconds since epoch, or as a Date object.

2. I've read that this value is easily overwritten by any app for any
purpose - if this is the case, it's not exactly reliable.

3. It's stopped working for me! (It's now returning a blank (not null)
String, despite there being alarms set). I guess if nothing better is
available to get this information, this will become a debugging
assistance discussion :-).


Is there a better, more reliable way to get the date/time of the next
Alarm set?

Thanks,
Mark.

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

Reply via email to