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

@easydl/native-calendar

v0.0.3

Published

android native calendar plugin

Downloads

14

Readme

@easydl/native-calendar

📅 Android Native Calendar Plugin for Capacitor

A lightweight Capacitor plugin to interact with the native Android Calendar. It allows you to create, list, update, and delete calendar events directly from your Capacitor app.

Note: This plugin currently supports Android only.

Features

  • Create Events: Add events with title, location, description, and time.
  • List Events: Query events within a specific time range.
  • Update Events: Modify existing events.
  • Delete Events: Remove events by ID.
  • Permission Handling: Automatically handles Android runtime permissions.

Install

npm install @easydl/native-calendar
npx cap sync

Android Configuration (Required)

To use this plugin, you must add the following permissions to your AndroidManifest.xml file.

Open android/app/src/main/AndroidManifest.xml and add these lines inside the <manifest> tag:

XML

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.your.app">

    <uses-permission android:name="android.permission.READ_CALENDAR" />
    <uses-permission android:name="android.permission.WRITE_CALENDAR" />

    <application ...>
        ...
    </application>
</manifest>

Usage Example

TypeScript

import { NativeCalendar } from '@easydl/native-calendar';

const testCalendar = async () => {
  try {
    // 1. Create an Event
    const createRes = await NativeCalendar.createEvent({
      title: "Team Meeting",
      location: "Conference Room A",
      description: "Discuss Q1 goals",
      startDate: Date.now() + 3600000, // 1 hour from now
      endDate: Date.now() + 7200000    // 2 hours from now
    });
    console.log("Event Created, ID:", createRes.id);

    // 2. List Events
    const listRes = await NativeCalendar.listEvents({
      startDate: Date.now(),
      endDate: Date.now() + 86400000 // Next 24 hours
    });
    console.log("Events found:", listRes.events);

  } catch (error) {
    console.error("Error:", error);
  }
};

API

listEvents(...)

TypeScript

listEvents(options: { startDate: number; endDate: number; }) => Promise<{ events: CalendarEvent[]; }>

Get a list of events within a specific date range.

| Param | Type | Description | | --- | --- | --- | | options | { startDate: number; endDate: number; } | Time range in milliseconds (timestamp) |

Returns: Promise<{ events: CalendarEvent[]; }>


createEvent(...)

TypeScript

createEvent(options: { title: string; startDate: number; endDate: number; location?: string; description?: string; }) => Promise<{ id: string; }>

Create a new calendar event.

| Param | Type | | --- | --- | | options | { title: string; startDate: number; endDate: number; location?: string; description?: string; } |

Returns: Promise<{ id: string; }>


deleteEvent(...)

TypeScript

deleteEvent(options: { id: string; }) => Promise<{ deleted: boolean; }>

Delete an event by its ID.

| Param | Type | | --- | --- | | options | { id: string; } |

Returns: Promise<{ deleted: boolean; }>


updateEvent(...)

TypeScript

updateEvent(options: { id: string; title?: string; startDate?: number; endDate?: number; description?: string; }) => Promise<{ updated: boolean; }>

Update an existing event. Only provide the fields you want to update.

| Param | Type | | --- | --- | | options | { id: string; title?: string; startDate?: number; endDate?: number; description?: string; } |

Returns: Promise<{ updated: boolean; }>


ping()

TypeScript

ping() => Promise<{ ok: boolean; platform: string; }>

Test the plugin connection.

Returns: Promise<{ ok: boolean; platform: string; }>


Interfaces

CalendarEvent

| Prop | Type | Description | | --- | --- | --- | | id | string | Unique ID of the event | | title | string | | | start | number | Start timestamp (ms) | | end | number | End timestamp (ms) | | description | string | | | location | string | |