Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support setting a measurement schedule with reminders #440

Open
pimlie opened this issue Sep 14, 2024 · 1 comment
Open

Support setting a measurement schedule with reminders #440

pimlie opened this issue Sep 14, 2024 · 1 comment
Labels
contributors-welcome Issues that ready to be implemented by contributors enhancement New feature or request

Comments

@pimlie
Copy link
Contributor

pimlie commented Sep 14, 2024

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:

  • Differentiate between types of measurement, i.e. blood pressure, weight, blood sugar etc
  • Configure a cron-like schedule (ie support daily at 8am or weekly on sunday at 9am)
  • Set a reminder delay, f.e. 2 hours
  • Then for a daily schedule of 8am, send a notification at 8am that it's time to take a measurement
  • If the user did not interact with the app or notification between 8am + the delay of 2hrs, ring the alarm at 10am so the user HAS to interact.

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

@pimlie pimlie added the enhancement New feature or request label Sep 14, 2024
@derdilla
Copy link
Owner

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.

@derdilla derdilla added the contributors-welcome Issues that ready to be implemented by contributors label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributors-welcome Issues that ready to be implemented by contributors enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants