react-native-alarm-scheduler
API reference

Debugging

Inspecting what the native layer actually did with your alarm.

getNativeAlarmDebugStateAsync(alarmId)

Returns native retry and presentation state for a logical alarm id. This is the tool for answering “why did the alarm behave differently than I configured it”.

const state = await AlarmScheduler.getNativeAlarmDebugStateAsync(alarmId);
type NativeAlarmDebugState = {
  alarmId: string;
  isComplete: boolean;
  activeRetryAlarmIds: string[];
  pendingActions: AlarmAction[];
  pendingHandoff?: AlarmAction | null;
  intentDebugCounts?: Record<string, number>;
  currentContext: AlarmContext | null;
  alertActionMode?: 'default' | 'openAppOnly';
  stopButtonIncluded?: boolean;
  secondaryButtonIncluded?: boolean;
  secondaryButtonBehavior?: 'openApp' | 'recordOnly' | 'none';
  stopIntentBehavior?: 'recordOnly' | 'openApp' | 'rescheduleImmediate';
  alertInitializer?: 'secondaryOnly' | 'legacyStopButton' | 'androidRingService';
  runtimeSupportsSecondaryOnlyAlert?: boolean;
  sound?: 'default' | 'named' | 'silent';
  soundName?: string;
  soundFallbackReason?: 'iosSimulatorCustomSoundUnsupported';
  soundUri?: string;
  isRinging?: boolean;
  isScheduled?: boolean;
  canUseFullScreenIntent?: boolean;
  canScheduleExactAlarms?: boolean;
};

Reading alertInitializer

This field tells you which alert presentation the runtime actually gave you.

If alertActionMode is openAppOnly but alertInitializer is legacyStopButton, the runtime required the legacy stop-button presentation and the package cannot remove that AlarmKit stop affordance. runtimeSupportsSecondaryOnlyAlert tells you whether the newer presentation was available at all.

On Android alertInitializer is always androidRingService — the package owns the ringing surface, so there is no system presentation to negotiate with.

Android live state

Four fields describe the live state of the ringing service and the two grants it depends on:

FieldMeaning
isRingingThe ring service is currently playing this alarm.
isScheduledThe alarm is still present in the native store.
canUseFullScreenIntentAndroid 14+ full-screen grant.
canScheduleExactAlarmsExact alarm grant — see Android behavior.

Completion state

isComplete reflects the completion marker set by completeNativeAlarmAsync(). While it is true, rescheduleImmediate will not arm new backup alarms for that id. Clear it with resetNativeAlarmCompletionAsync(alarmId).

activeRetryAlarmIds lists backup and legacy retry alarms currently armed for the logical alarm id.