You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Server 9994db28bd feat: implement core notification functionality for iOS and Android - Add settings management, proper error handling, and platform-specific implementations 6 days ago
.github refactor: improve build configuration and code organization 1 week ago
android feat: implement core notification functionality for iOS and Android - Add settings management, proper error handling, and platform-specific implementations 6 days ago
examples refactor: improve build configuration and code organization 1 week ago
ios feat: implement core notification functionality for iOS and Android - Add settings management, proper error handling, and platform-specific implementations 6 days ago
scripts refactor: improve build configuration and code organization 1 week ago
src refactor: improve build configuration and code organization 1 week ago
tests refactor: improve build configuration and code organization 1 week ago
www refactor: improve build configuration and code organization 1 week ago
.gitignore Initial commit 1 week ago
CHANGELOG.md refactor: improve build configuration and code organization 1 week ago
CONTRIBUTING.md refactor: improve build configuration and code organization 1 week ago
CapacitorDailyNotification.podspec refactor: improve build configuration and code organization 1 week ago
LICENSE refactor: improve build configuration and code organization 1 week ago
README.md feat: implement core notification functionality for iOS and Android - Add settings management, proper error handling, and platform-specific implementations 6 days ago
SECURITY.md refactor: improve build configuration and code organization 1 week ago
capacitor.config.ts refactor: improve build configuration and code organization 1 week ago
jest.config.js refactor: improve build configuration and code organization 1 week ago
package-lock.json feat: implement core notification functionality for iOS and Android - Add settings management, proper error handling, and platform-specific implementations 6 days ago
package.json feat: implement core notification functionality for iOS and Android - Add settings management, proper error handling, and platform-specific implementations 6 days ago
tsconfig.json refactor: improve build configuration and code organization 1 week ago

README.md

Daily Notification Plugin for Capacitor

A Capacitor plugin for scheduling and managing daily notifications with advanced features and robust error handling.

Features

  • Schedule daily notifications with custom time and content
  • Support for different priority levels
  • Timezone-aware scheduling
  • Offline support with caching
  • Comprehensive permission handling
  • Automatic retry logic
  • Detailed notification status tracking
  • Configurable settings management

Installation

npm install daily-notification-plugin
npx cap sync

iOS Setup

No additional setup required for iOS. The plugin automatically handles all necessary configurations.

Usage

Basic Usage

import { DailyNotification } from 'daily-notification-plugin';

// Schedule a daily notification
await DailyNotification.scheduleDailyNotification({
  url: 'https://api.example.com/updates',
  time: '09:00',
  title: 'Daily Update',
  body: 'Your daily update is ready'
});

Advanced Features

Custom Priority

await DailyNotification.scheduleDailyNotification({
  url: 'https://api.example.com/updates',
  time: '09:00',
  priority: 'high'
});

Timezone Support

await DailyNotification.scheduleDailyNotification({
  url: 'https://api.example.com/updates',
  time: '09:00',
  timezone: 'America/New_York'
});

Check Notification Status

const status = await DailyNotification.getNotificationStatus();
console.log('Notification status:', status);

Update Settings

await DailyNotification.updateSettings({
  sound: true,
  priority: 'high',
  timezone: 'America/Los_Angeles'
});

API Documentation

Methods

scheduleDailyNotification(options: ScheduleOptions)

Schedule a new daily notification.

getLastNotification()

Get information about the last delivered notification.

cancelAllNotifications()

Cancel all pending notifications.

getNotificationStatus()

Get current notification status and settings.

updateSettings(settings: NotificationSettings)

Update notification settings.

checkPermissions()

Check current notification permissions.

requestPermissions()

Request notification permissions.

Types

interface ScheduleOptions {
  url: string;
  time: string;
  title?: string;
  body?: string;
  sound?: boolean;
  priority?: 'high' | 'default' | 'low';
  timezone?: string;
}

interface NotificationSettings {
  sound?: boolean;
  priority?: string;
  timezone?: string;
}

Error Handling

The plugin provides detailed error messages for various scenarios:

  • Invalid parameters
  • Permission issues
  • Scheduling failures
  • Invalid time formats
  • Invalid timezone identifiers
  • Invalid priority values

Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests to our GitHub repository.

License

MIT License - see LICENSE file for details