- Android: move plugin source to org/timesafari/dailynotification, update namespace, manifest package, and all package/imports; change intent actions to org.timesafari.daily.NOTIFICATION and DISMISS - iOS: update bundle IDs, BGTask identifiers, subsystem labels, and queue names in Plugin and Xcode projects - Capacitor: update plugin class registration and appIds in configs - Test apps (android-test-app, daily-notification-test, ios-test-app): applicationId/bundleId, manifests, ProGuard, scripts, and docs - Docs: bulk update references; add CONSUMING_APP_MIGRATION_COM_TO_ORG.md for consuming app migration BREAKING CHANGE: Consuming apps must update plugin class to org.timesafari.dailynotification.DailyNotificationPlugin, manifest receivers/actions, and iOS BGTask identifiers per migration doc.
1.3 KiB
1.3 KiB
Quick Start Guide
Purpose: Minimal working example for Daily Notification Plugin.
Owner: Development Team
Last Updated: 2025-12-22
Status: active
Minimal Working Example
import { DailyNotification } from '@timesafari/daily-notification-plugin';
// 1. Request permission
const { state } = await DailyNotification.requestPermission();
if (state !== 'granted') {
console.error('Permission denied');
return;
}
// 2. Create schedule
const { schedule } = await DailyNotification.createSchedule({
id: 'daily-morning',
kind: 'notify',
clockTime: '09:00',
enabled: true
});
// 3. Verify schedule
const { schedules } = await DailyNotification.getSchedules();
console.log('Active schedules:', schedules);
Platform Setup
iOS
Add to Info.plist:
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>org.timesafari.dailynotification.fetch</string>
</array>
Android
Add to AndroidManifest.xml:
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
See also:
- Common Patterns — Common integration patterns
- Integration Guide — Full integration guide