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.
 
 
 
 
 
 
Matthew Raymer a2d1fb33a6 chore: update Android test app dependencies to latest stable versions 6 days ago
.cursor/rules docs: add comprehensive notification system documentation 1 week ago
.github refactor: improve build configuration and code organization 6 months ago
android feat: Upgrade Gradle and Android build tools for callback system implementation 3 weeks ago
doc docs: add comprehensive notification system documentation 1 week ago
examples feat(performance): implement Phase 3.3 performance optimization for production 6 days ago
gradle feat: Upgrade Gradle and Android build tools for callback system implementation 3 weeks ago
ios feat(performance): implement Phase 3.3 performance optimization for production 6 days ago
lib docs: add comprehensive notification system documentation 1 week ago
scripts refactor: improve build configuration and code organization 6 months ago
src feat(performance): implement Phase 3.3 performance optimization for production 6 days ago
test-apps chore: update Android test app dependencies to latest stable versions 6 days ago
tests feat: Implement dual scheduling API design and interfaces 3 weeks ago
www refactor: improve build configuration and code organization 6 months ago
.eslintrc.json refactor(plugin): modernize plugin architecture and improve type definitions 6 months ago
.gitattributes feat(android): Enhance battery optimization and notification management 6 months ago
.gitignore chore: remove Gradle build cache files and update .gitignore 3 weeks ago
.prettierrc refactor(plugin): modernize plugin architecture and improve type definitions 6 months ago
API.md feat: add minimal Capacitor test apps for all platforms 6 days ago
CHANGELOG.md refactor: improve build configuration and code organization 6 months ago
CONTRIBUTING.md refactor: improve build configuration and code organization 6 months ago
CRITICAL_IMPROVEMENTS.md fix(plugin): resolve build issues and improve project structure 2 months ago
CapacitorDailyNotification.podspec refactor: improve build configuration and code organization 6 months ago
IMPROVEMENT_SUMMARY.md fix(plugin): resolve build issues and improve project structure 2 months ago
LICENSE refactor: improve build configuration and code organization 6 months ago
PROJECT_ASSESSMENT.md fix(plugin): resolve build issues and improve project structure 2 months ago
README.md feat: add minimal Capacitor test apps for all platforms 6 days ago
SECURITY.md refactor: improve build configuration and code organization 6 months ago
USAGE.md feat: add minimal Capacitor test apps for all platforms 6 days ago
build.gradle.kts feat(android): Enhance battery optimization and notification management 6 months ago
capacitor.config.ts refactor(plugin): modernize plugin architecture and improve type definitions 6 months ago
gradle.properties feat(android): Enhance battery optimization and notification management 6 months ago
gradlew feat: Upgrade Gradle and Android build tools for callback system implementation 3 weeks ago
gradlew.bat feat: Upgrade Gradle and Android build tools for callback system implementation 3 weeks ago
package-lock.json docs(feature-planning)!: focus on implementation plan 3 weeks ago
package.json chore: Update markdown validation scripts to exclude node_modules 3 weeks ago
rollup.config.js fix(plugin): resolve build issues and improve project structure 2 months ago
settings.gradle.kts feat(android): Enhance battery optimization and notification management 6 months ago
tsconfig.json refactor(plugin): modernize plugin architecture and improve type definitions 6 months ago

README.md

Daily Notification Plugin

A Native-First Capacitor plugin for reliable daily notifications across Android, iOS, and Web platforms.

Key Features

  • Native-First Architecture: Optimized for mobile platforms with offline-first design
  • Shared SQLite Storage: Single database file with WAL mode for concurrent access
  • TTL-at-Fire Enforcement: Skip stale notifications before delivery
  • Rolling Window Safety: Always keep today's notifications armed
  • Cross-Platform: Unified API across Android, iOS, and Web
  • Production Ready: Comprehensive error handling, performance optimization, and monitoring

Quick Start

import { DailyNotification } from '@timesafari/daily-notification-plugin';

// Configure and schedule
await DailyNotification.configure({
  storage: 'shared',
  ttlSeconds: 1800,
  prefetchLeadMinutes: 15
});

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

Installation

npm install @timesafari/daily-notification-plugin

Documentation

Examples

  • Basic Usage: examples/usage.ts
  • Phase-by-Phase Implementation:
    • Phase 1: examples/phase1-*.ts (Core Infrastructure)
    • Phase 2: examples/phase2-*.ts (Platform Completion)
    • Phase 3: examples/phase3-*.ts (Network Optimization)
  • Advanced Scenarios: examples/advanced-usage.ts
  • Enterprise Features: examples/enterprise-usage.ts

Configuration

Android

Add the following permissions to your AndroidManifest.xml:

<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Development

Prerequisites

  • Node.js 14 or later
  • Android Studio
  • Android SDK
  • Gradle

Building

# Install dependencies
npm install

# Build the plugin
npm run build

# Run tests
npm test

Project Structure

daily-notification-plugin/
├── android/                 # Android implementation
│   ├── app/                # Main application module
│   └── build.gradle        # Root build configuration
├── src/                    # TypeScript source
├── tests/                  # Test files
├── package.json           # Package configuration
└── README.md              # This file

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Matthew Raymer

Security

This plugin follows security best practices:

  • Uses AndroidX for modern security features
  • Implements proper permission handling
  • Follows Android security guidelines
  • Uses secure storage for sensitive data
  • Implements proper error handling
  • Logs security-relevant events
  • Uses secure communication channels
  • Implements proper access control
  • Follows Android's security model
  • Uses secure defaults

Changelog

1.0.0

  • Initial release
  • Basic notification scheduling
  • System state handling
  • Battery optimization support
  • Background task management
  • Rich logging system