forked from trent_larson/crowd-funder-for-time-pwa
feat(notifications): integrate daily notification plugin into AccountViewView
- Add notification methods to PlatformService interface - Implement notification support in CapacitorPlatformService with plugin integration - Add stub implementations in WebPlatformService and ElectronPlatformService - Add nativeNotificationTime, nativeNotificationTitle, and nativeNotificationMessage fields to Settings interface - Create DailyNotificationSection component for AccountViewView integration - Add Android manifest permissions (POST_NOTIFICATIONS, SCHEDULE_EXACT_ALARM, RECEIVE_BOOT_COMPLETED) - Register daily-notification-plugin in capacitor.plugins.json - Integrate DailyNotificationSection into AccountViewView Features: - Platform capability detection (hides on unsupported platforms) - Permission request flow with fallback to settings - Schedule/cancel notifications - Time editing with HTML5 time input - Settings persistence - Plugin state synchronization on app load NOTE: Currently storing notification schedule in SQLite database, but plugin was designed to store schedule internally. Consider migrating to plugin's internal storage to avoid database initialization issues.
This commit is contained in:
@@ -45,4 +45,15 @@
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-feature android:name="android.hardware.camera" android:required="true" />
|
||||
|
||||
<!-- Notification permissions -->
|
||||
<!-- POST_NOTIFICATIONS required for Android 13+ (API 33+) -->
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
|
||||
<!-- SCHEDULE_EXACT_ALARM required for Android 12+ (API 31+) to schedule exact alarms -->
|
||||
<!-- Note: On Android 12+, users can grant/deny this permission -->
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||
|
||||
<!-- RECEIVE_BOOT_COMPLETED needed to reschedule notifications after device reboot -->
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
</manifest>
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
"pkg": "@capawesome/capacitor-file-picker",
|
||||
"classpath": "io.capawesome.capacitorjs.plugins.filepicker.FilePickerPlugin"
|
||||
},
|
||||
{
|
||||
"pkg": "@timesafari/daily-notification-plugin",
|
||||
"classpath": "com.timesafari.dailynotification.DailyNotificationPlugin"
|
||||
},
|
||||
{
|
||||
"pkg": "@timesafari/daily-notification-plugin",
|
||||
"classpath": "com.timesafari.dailynotification.DailyNotificationPlugin"
|
||||
|
||||
Reference in New Issue
Block a user