Open pimlie opened 2 months ago
I really like that idea, but I don't think this is realistically implementable. When I toyed around with this a while back I ran across the classical dontkillmyapp.com problems, the flutter_local_notifications package has a whole section listing various other limitations.
Notifications also require the background permission
If AlarmManager works as expected they shouldn't. In some OEMs notifications only work with a background activity, as you suggested. Some OEMs even kill the background activity and would need a foreground activity (persisten notification). So when implementing this there would probably be lots of extensive on-device testing involved (Or we just show a warning this might be unreliable on some devices and hope no-one has to report issues).
I'm aware that the most reliable option would be to rely on FCM, but that would leak "who needs to take how many bp measurements per day" by design. Additionally F-Droid can't use the SDK, since it's not open source.
An e-mailer proposed auto filling medicine intake. You would do that around a shedule, not auto-filing once a medicine has been entered at that time of day. The logic quite similar to what is proposed here, so an implementation might want to keep this part abstract enough to extend.
What you want:
It would be nice if you could create a schedule when you expect to take a certain measurement, and automatically be reminded about them if you didn't take that measurement.
How this could work:
This feature would probably be most useful on mobile devices, a bit less on desktops as notifications & alarms are not core features of those platforms.
Notifications also require the background permission (at least on android), without that permission notifications won't be sent in time.
Why you want it:
Life can be busy at times, so a reminder helps with consistency