API reference
Overview
Every method exposed by the default export, grouped by what it does.
The package exposes the alarm API as its default export and as the named AlarmScheduler export:
import AlarmScheduler from 'react-native-alarm-scheduler';
// Equivalent:
import { AlarmScheduler } from 'react-native-alarm-scheduler';All types are also exported as named exports from the same module.
Permissions
| Method | Returns |
|---|---|
getPermissionsAsync() | AlarmPermissionResponse |
requestPermissionsAsync() | AlarmPermissionResponse |
openAlarmSettingsAsync() | boolean |
openFullScreenIntentSettingsAsync() | boolean |
Scheduling
| Method | Returns |
|---|---|
scheduleAlarmAsync(alarm) | ScheduledAlarm |
cancelAlarmAsync(id) | boolean |
getScheduledAlarmsAsync() | ScheduledAlarm[] |
Context and actions
| Method | Returns |
|---|---|
getCurrentAlarmContextAsync() | AlarmContext | null |
getPendingNativeAlarmHandoffAsync() | AlarmAction | null |
clearPendingNativeAlarmHandoffAsync() | void |
getPendingAlarmActionsAsync() | AlarmAction[] |
clearPendingAlarmActionsAsync(ids?) | void |
Completion and backup
| Method | Returns |
|---|---|
completeNativeAlarmAsync(alarmId) | void |
scheduleNativeAlarmBackupAsync(alarmId, delaySeconds?) | NativeAlarmBackupResult |
cancelNativeAlarmBackupAsync(alarmId) | boolean |
resetNativeAlarmCompletionAsync(alarmId) | void |
clearBypassAsync(alarmId) | void |
Alarm occurrences
| Method | Returns |
|---|---|
resolveAlarmOccurrenceAsync(occurrenceId, resolution) | AlarmOccurrenceResolutionResult |
getAlarmOccurrencesAsync(alarmId?) | AlarmOccurrence[] |
cancelAlarmOccurrenceAsync(occurrenceId) | boolean |
System Clock (Android)
| Method | Returns |
|---|---|
setSystemAlarmAsync(alarm) | boolean |
openSystemAlarmAppAsync() | boolean |
Debugging
| Method | Returns |
|---|---|
getNativeAlarmDebugStateAsync(alarmId) | NativeAlarmDebugState |