mirror of
https://github.com/avinal/nikki.git
synced 2026-07-03 21:40:09 +05:30
Add time parsing, exact alarm notifications, boot reschedule
Time parsing: - 12-hour format: 5pm, 2:30pm, 11am, 12am (midnight), 12pm (noon) - 24-hour format: 14:30, 9:00, 17:00 - Time extracted alongside date: "@today 3pm p1 #work" - Time cleaned from display text - dueTime field added to Task domain model (LocalTime?) Notification scheduling: - Tasks with specific time: AlarmManager.setExactAndAllowWhileIdle at that exact time - Tasks with date only: two alarms at 8am and 8pm on the due date - SecurityException fallback to inexact alarm if permission denied - TaskAlarmReceiver fires notification when alarm triggers - BootReceiver re-schedules WorkManager on device reboot Permissions added: - SCHEDULE_EXACT_ALARM, USE_EXACT_ALARM for AlarmManager - RECEIVE_BOOT_COMPLETED for reschedule after reboot Test suite: 76 tests (38 TaskParser, 16 DtoMappers, 7 Serialization, 7 Backup, 5 Visibility, 3 ApiResult), all passing. 9 new time parsing tests: 12h am/pm, 12h with minutes, 24h, midnight, noon, no time returns null, time+date combo, time cleaned from text. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<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" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
@@ -23,6 +26,18 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<receiver
|
||||
android:name="com.avinal.memos.notifications.TaskAlarmReceiver"
|
||||
android:exported="false" />
|
||||
|
||||
<receiver
|
||||
android:name="com.avinal.memos.notifications.BootReceiver"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
||||
Reference in New Issue
Block a user