# AlarmManager.OnAlarmListener

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

# AlarmManager.OnAlarmListener

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/app/AlarmManager.OnAlarmListener "View this page in Kotlin")\|Java

`
public
static


interface
AlarmManager.OnAlarmListener
`  
`


`

|------------------------------------------|
| android.app.AlarmManager.OnAlarmListener |

<br />

*** ** * ** ***

Direct-notification alarms: the requester must be running continuously from the time the alarm is set to the time it is delivered, or delivery will fail. Only one-shot alarms can be set using this mechanism, not repeating alarms.

## Summary

|                                                                                              ### Public methods                                                                                               ||
|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onAlarm](https://developer.android.com/reference/android/app/AlarmManager.OnAlarmListener#onAlarm())`() ` Callback method that is invoked by the system when the alarm time is reached. |

## Public methods

### onAlarm

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void onAlarm ()
```

Callback method that is invoked by the system when the alarm time is reached.

<br />