Is there a way to see the Android alarm settings list?

Asked 2 years ago, Updated 2 years ago, 21 views

alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), sender);

Set the alarm to sound at a specific time as above (multiple)

Is there a way to see the list of alarms?

Thank you^

^

android

2022-09-22 15:33

1 Answers

Someone wrote how to get a list of getNextAlarmClock() repeatedly in a foreign country.

Source: https://www.laurivan.com/list-alarms-in-android/

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void listAlarms() {
    for (AlarmManager.AlarmClockInfo aci = mAlarmManager.getNextAlarmClock(); 
         aci != null;
         aci = mAlarmManager.getNextAlarmClock()) {
        Log.d(TAG, aci.getShowIntent().toString());
        Log.d(TAG, String.format("Trigger time: %d", aci.getTriggerTime()));
    }
}


2022-09-22 15:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.