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

Add reminders to start/stop tracking of regular sleeps #382

Open
mike-nc94 opened this issue May 9, 2023 · 8 comments
Open

Add reminders to start/stop tracking of regular sleeps #382

mike-nc94 opened this issue May 9, 2023 · 8 comments
Labels
enhancement New feature or request up for grabs Nobody is working on this at the moment

Comments

@mike-nc94
Copy link

Problem

It happens from time to time that I forget to start or stop the tracking of my daily sleep.

Desired solution

It would be nice to have the app remind me in the evening and morning to interact accordingly. I imagine a setting where I can simply create multiple time based, recurring reminders that will trigger a notification. Optimally tracking would be started or stopped respectively when the notification (or a button on it) is pressed.

Additionally such reminders could even serve as a call to go to bed.

@mike-nc94 mike-nc94 changed the title Add reminders to start/stop tracking regular sleeps Add reminders to start/stop tracking of regular sleeps May 9, 2023
@vmiklos
Copy link
Owner

vmiklos commented May 12, 2023

Would this more or less duplicate the functionality of some alarm clock?

I'm not entirely against it, but I rarely have the "forgot to go to bed" problem myself.

Would you be interested in contributing a PR that does this?

Also, any other open source apps that have something similar, in case we could model our UI based on what they do?

@vmiklos vmiklos added enhancement New feature or request needinfo Further information is requested labels May 12, 2023
@mike-nc94
Copy link
Author

mike-nc94 commented May 15, 2023

Would this more or less duplicate the functionality of some alarm clock?

If you want yes but ... I find an alarm clock more intrusive than a notification and also would not integrate with the app so features like quick start and stop from the notification are not possible.

I'm not entirely against it, but I rarely have the "forgot to go to bed" problem myself.

It's not a "forgot to go to bed" problem rather than discipline to enter every sleep.

Would you be interested in contributing a PR that does this?

In principle yes but I am not familiar with Kotlin and unfortunately don't really have enough time to dedicate. :/

Also, any other open source apps that have something similar, in case we could model our UI based on what they do?

Yes, actually I discovered that feature from com.oriondev.moneywallet 1 and find it really useful there.

Footnotes

  1. https://f-droid.org/de/packages/com.oriondev.moneywallet/

@vmiklos
Copy link
Owner

vmiklos commented May 16, 2023

Thanks. Time is a limed resource for all of us, but otherwise this looks reasonable to me for addition.

@vmiklos vmiklos added up for grabs Nobody is working on this at the moment and removed needinfo Further information is requested labels May 16, 2023
@RageGamerBoi
Copy link

Additionally such reminders could even serve as a call to go to bed.

That would be a good bonus for those of us who find ourselves staying up too late and getting 5 hours of sleep.
In some ways that's the main reason I'm still using Sleep as Android...

@dinesh-58
Copy link

Also, any other open source apps that have something similar, in case we could model our UI based on what they do?

Not really open source but Samsung Health sends 2 notifications. One at night that says something like "Almost bedtime. Try reading or meditating". It automatically estimates when you went to bed and woke up (based on phone usage or the gyro sensor, I assume). It then sends a notification in the morning asking if the estimated time is correct and if so, to record it.

I don't think this app needs the auto-estimate feature but these types of notifications would be nice. Samsung Health requires an account to use it, so let me know if you want me to take screenshots of the notifications and app UI.

Would like to help someday but I'm currently caught up with college and work.

@vmiklos
Copy link
Owner

vmiklos commented Jan 9, 2024

That's a good idea: a first step we could do is to just schedule an alarm based on the already set ideal sleep length. If you start tracking and you don't stop in 8 hours (by default), then it makes sense to trigger a notification.

I assume the way to do that is something like https://developer.android.com/develop/background-work/services/alarms/schedule

That is just for the stop part, and perhaps it needs a setting to be opt-in, but otherwise it would solve half of what this issue is requesting.

@dinesh-58
Copy link

Counting 8 hours from the start of tracking is a good idea. Forgot to mention that Samsung Health allows setting a target time for when you want to go to bed and wake up. The "get ready for bed" notification is sent around 10 minutes before the target bed time.

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Apr 20, 2024

#382 (comment)

@mike-nc94, in the meantime, https://github.com/tasks/tasks/blob/f3c28fe60d4bd3dadf314f253dc16658ed367954/README.md with a task synchronized to NextCloud via CalDAV seems to work better for me, because it's multiplatform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request up for grabs Nobody is working on this at the moment
Projects
None yet
Development

No branches or pull requests

5 participants