npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@capgo/capacitor-alarm

v8.0.8

Published

Manage native alarm Capacitor plugin

Readme

@capgo/capacitor-alarm

Manage native alarm Capacitor plugin

Why Capacitor Alarm?

The only plugin implementing the latest native alarm APIs for both iOS and Android:

  • iOS 26+ AlarmKit - Full integration with Apple's new alarm framework
  • Android AlarmClock intents - Modern alarm management following OEM policies
  • Future-proof - Built on the newest platform APIs, not deprecated methods
  • Cross-platform - Consistent API across iOS and Android

Essential for alarm clock apps, reminder apps, medication trackers, and any app needing native system alarms.

Documentation

The most complete doc is available here: https://capgo.app/docs/plugins/alarm/

Compatibility

| Plugin version | Capacitor compatibility | Maintained | | -------------- | ----------------------- | ---------- | | v8.*.* | v8.*.* | ✅ | | v7.*.* | v7.*.* | On demand | | v6.*.* | v6.*.* | ❌ | | v5.*.* | v5.*.* | ❌ |

Note: The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.

Install

npm install @capgo/capacitor-alarm
npx cap sync

Requirements

  • iOS: iOS 26+ only. This plugin relies on AlarmKit APIs and will report unsupported on earlier versions or when the framework is unavailable.
  • Android: Uses AlarmClock intents; behavior depends on the default Clock app and OEM policies.

Note: This plugin only exposes native alarm actions (create/open). It does not implement any custom in-app alarm scheduling/CRUD.

Permission checks

Use CapgoAlarm.checkPermissions() to query whether AlarmKit (iOS) or the platform clock integration (Android) is ready before prompting users. The method never opens system UI and returns a PermissionResult with details describing platform-specific states (for example, { alarmKit: true } on iOS or { exactAlarm: false } on Android 12+).

If your native runtime ships an older build of this plugin that predates the checkPermissions bridge, the JavaScript shim resolves with { granted: false, message: 'CapgoAlarm.checkPermissions is not implemented...' } so you can gracefully fall back to feature detection or request an update.

API

Capacitor Alarm Plugin interface for managing native OS alarms.

createAlarm(...)

createAlarm(options: NativeAlarmCreateOptions) => Promise<NativeActionResult>

Create a native OS alarm using the platform clock app. On Android this uses the Alarm Clock intent; on iOS this uses AlarmKit if available (iOS 16+).

| Param | Type | Description | | ------------- | ----------------------------------------------------------------------------- | -------------------------------- | | options | NativeAlarmCreateOptions | - Options for creating the alarm |

Returns: Promise<NativeActionResult>

Since: 1.0.0


openAlarms()

openAlarms() => Promise<NativeActionResult>

Open the platform's native alarm list UI, if available.

Returns: Promise<NativeActionResult>

Since: 1.0.0


getOSInfo()

getOSInfo() => Promise<OSInfo>

Get information about the OS and capabilities.

Returns: Promise<OSInfo>

Since: 1.0.0


requestPermissions(...)

requestPermissions(options?: { exactAlarm?: boolean | undefined; } | undefined) => Promise<PermissionResult>

Request relevant permissions for alarm usage on the platform. On Android, may route to settings for exact alarms.

| Param | Type | Description | | ------------- | -------------------------------------- | ------------------------------------------------ | | options | { exactAlarm?: boolean; } | - Optional parameters for the permission request |

Returns: Promise<PermissionResult>

Since: 1.0.0


checkPermissions()

checkPermissions() => Promise<PermissionResult>

Check the current permission state for native alarm access without triggering UI. On iOS this reports AlarmKit readiness; on Android it reports capability details.

Returns: Promise<PermissionResult>

Since: 8.0.4


getPluginVersion()

getPluginVersion() => Promise<{ version: string; }>

Get the native Capacitor plugin version.

Returns: Promise<{ version: string; }>

Since: 1.0.0


getAlarms()

getAlarms() => Promise<{ alarms: AlarmInfo[]; message?: string; }>

Get a list of alarms scheduled by this app. On iOS 26+, returns alarms from AlarmKit. On Android, this is not supported as the system does not provide an API to query alarms.

Returns: Promise<{ alarms: AlarmInfo[]; message?: string; }>

Since: 1.1.0


Interfaces

NativeActionResult

Result of a native action.

| Prop | Type | Description | | ------------- | -------------------- | -------------------------------------------- | | success | boolean | Whether the action was successful | | message | string | Optional message with additional information |

NativeAlarmCreateOptions

Options for creating a native OS alarm via the platform clock app.

| Prop | Type | Description | | ------------- | -------------------- | -------------------------------------------- | | hour | number | Hour of day in 24h format (0-23) | | minute | number | Minute of hour (0-59) | | label | string | Optional label for the alarm | | skipUi | boolean | Android only: attempt to skip UI if possible | | vibrate | boolean | Android only: set alarm to vibrate |

OSInfo

Returned info about current OS and capabilities.

| Prop | Type | Description | | ------------------------------------ | -------------------- | ----------------------------------------------------------- | | platform | string | Platform identifier: 'ios' | 'android' | 'web' | | version | string | OS version string | | supportsNativeAlarms | boolean | Whether the platform exposes a native alarm app integration | | supportsScheduledNotifications | boolean | Whether scheduling local notifications is supported | | canScheduleExactAlarms | boolean | Android only: whether exact alarms are allowed |

PermissionResult

Result of a permissions request.

| Prop | Type | Description | | ------------- | ---------------------------------------------------------------- | ---------------------------------- | | granted | boolean | Overall grant for requested scope | | details | Record<string, boolean> | Optional details by permission key | | message | string | Optional human readable diagnostic |

AlarmInfo

Information about a scheduled alarm.

| Prop | Type | Description | | ------------- | -------------------- | -------------------------------- | | id | string | Unique identifier for the alarm | | hour | number | Hour of day in 24h format (0-23) | | minute | number | Minute of hour (0-59) | | label | string | Optional label for the alarm | | enabled | boolean | Whether the alarm is enabled |

Type Aliases

Record

Construct a type with a set of properties K of type T

{ [P in K]: T; }