I've been seeking how to simply get a list of all enabled alarm. So far I found two things:
String nextAlarm = Settings.System.getString(getContentResolver(),
Settings.System.NEXT_ALARM_FORMATTED);
And this project but it uses:
public static final Uri CONTENT_URI =
Uri.parse("content://com.android.deskclock/alarm");
ContentResolver cr = getContentResolver();
Cursor c = null;
c = cr.query(
CONTENT_URI, ALARM_QUERY_COLUMNS,
null, null, DEFAULT_SORT_ORDER);
And as said by CommonsWare here: "This is not part of the Android SDK. It may not work on all devices. It may not work on all current Android versions. It may not work on future Android versions. It is not documented. It is not supported".
So far, the first one works but gives only one alarm when I want all of them. And the second one is just not good.
So how can I get a list of upcoming alarm ?
Thanks in advance.