Context
The previous Android app implemented reminders with AlarmManager, JSON persistence, boot rescheduling, and foreground services. The Flutter migration copied the Java reminder classes into the Android runner, but reminder creation is not yet exposed as a normal Flutter/Dart assistant tool. iOS already has a basic createReminder bridge method using local notifications.
Relevant existing code:
app/src/main/java/com/example/studyOS/Reminder/ReminderManager.java
app/src/main/java/com/example/studyOS/Reminder/ReminderReceiver.java
app/src/main/java/com/example/studyOS/Reminder/ReminderService.java
flutter_app/android/app/src/main/java/com/example/studyOS/Reminder/ReminderManager.java
flutter_app/android/app/src/main/AndroidManifest.xml
flutter_app/ios/Runner/StudyOSNativeBridge.swift
flutter_app/lib/src/native_bridge.dart
Current state
Android old/native behavior:
ReminderManager.create(title, time, type, repeat) schedules exact alarms.
- Reminders are persisted in
reminders.json.
BOOT_COMPLETED reschedules reminders.
ReminderService can wake the app, prepare the assistant environment, and trigger assistant behavior for reminders.
Flutter migration state:
- Android manifest already includes reminder receiver/service permissions.
- Android native initialization calls
ReminderManager.get().init(applicationContext).
- iOS bridge exposes
createReminder with title and secondsFromNow.
- Dart
NativeBridge does not yet expose cross-platform reminder creation.
- The assistant tool catalog does not yet include a reminder tool.
Proposed scope
Expose reminder creation from Flutter as an assistant/native tool while keeping platform-specific scheduling behind platform channels.
Suggested tool shape:
create_reminder
- required:
title, time
- optional:
type (REMINDER, ALARM, MORNING_ROUTINE on Android where supported), repeat (ONCE, DAILY, WEEKLY where supported)
Implementation notes:
- Prefer passing an ISO timestamp from Dart to native code; avoid fragile natural-language parsing in the native bridge.
- Keep natural-language parsing in the assistant/model layer or a tested Dart utility if needed.
- Return exact native errors for missing notification/exact-alarm permission instead of swallowing exceptions.
Acceptance criteria
- Flutter
NativeBridge exposes createReminder with a stable argument contract.
- Android
MethodChannel schedules reminders through the copied ReminderManager.
- iOS path either reuses the existing local notification bridge or is aligned with the same Dart method shape.
- Dart assistant tool catalog includes
create_reminder and routes it through the native bridge.
- Unsupported repeat/type combinations return explicit platform errors.
- Existing Android boot rescheduling remains intact.
- User-facing copy clearly distinguishes reminders, alarms, and unsupported morning-routine behavior.
Platform/security notes
- Android exact alarms may require user approval depending on API/device policy.
- iOS local notifications are not equivalent to Android alarm-clock/foreground-service behavior.
- Background assistant activation should be conservative and visible; do not silently start long-running mic/listening behavior from a reminder.
Test expectations
- Add Dart tests for argument validation and tool routing.
- Add Android manual QA for one-time reminder, repeating reminder, and reboot/reschedule where feasible.
- Add iOS manual QA for notification permission denial and successful local notification scheduling.
Context
The previous Android app implemented reminders with
AlarmManager, JSON persistence, boot rescheduling, and foreground services. The Flutter migration copied the Java reminder classes into the Android runner, but reminder creation is not yet exposed as a normal Flutter/Dart assistant tool. iOS already has a basiccreateReminderbridge method using local notifications.Relevant existing code:
app/src/main/java/com/example/studyOS/Reminder/ReminderManager.javaapp/src/main/java/com/example/studyOS/Reminder/ReminderReceiver.javaapp/src/main/java/com/example/studyOS/Reminder/ReminderService.javaflutter_app/android/app/src/main/java/com/example/studyOS/Reminder/ReminderManager.javaflutter_app/android/app/src/main/AndroidManifest.xmlflutter_app/ios/Runner/StudyOSNativeBridge.swiftflutter_app/lib/src/native_bridge.dartCurrent state
Android old/native behavior:
ReminderManager.create(title, time, type, repeat)schedules exact alarms.reminders.json.BOOT_COMPLETEDreschedules reminders.ReminderServicecan wake the app, prepare the assistant environment, and trigger assistant behavior for reminders.Flutter migration state:
ReminderManager.get().init(applicationContext).createReminderwithtitleandsecondsFromNow.NativeBridgedoes not yet expose cross-platform reminder creation.Proposed scope
Expose reminder creation from Flutter as an assistant/native tool while keeping platform-specific scheduling behind platform channels.
Suggested tool shape:
create_remindertitle,timetype(REMINDER,ALARM,MORNING_ROUTINEon Android where supported),repeat(ONCE,DAILY,WEEKLYwhere supported)Implementation notes:
Acceptance criteria
NativeBridgeexposescreateReminderwith a stable argument contract.MethodChannelschedules reminders through the copiedReminderManager.create_reminderand routes it through the native bridge.Platform/security notes
Test expectations