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 Alarm Feature #402

Open
heberjeur opened this issue Jul 11, 2023 · 9 comments
Open

Add Alarm Feature #402

heberjeur opened this issue Jul 11, 2023 · 9 comments
Labels
needinfo Further information is requested

Comments

@heberjeur
Copy link

Can you add a new feature that allows users to set alarms in addition to the sleep tracking functionality? I don't want to have two separate applications for alarms and sleep tracking.

The addition of the alarm feature improves the overall user experience by providing a convenient way to wake up at a desired time while simultaneously tracking sleep duration.

@vmiklos
Copy link
Owner

vmiklos commented Jul 11, 2023

Hmm, I guess all Android systems ship the built-in Clock app that has an alarm feature, so adding one more inside this app would be just a duplicate. What would be the selling point of a built-in alarm thing?

@vmiklos vmiklos added the needinfo Further information is requested label Jul 11, 2023
@heberjeur
Copy link
Author

I have a built-in Samsung clock, but I don't have confidence in it. It sends a lot of information to their servers.

@powerjungle
Copy link

Not to make you unnecessarily paranoid, but I'm assuming the operating system is Samsung's own fork of Android. What makes you trust the whole system then?

What I'm trying to say is what you're trying to do has a different solution. The app is perfect the way it is. It does exactly what it needs to, no need to bloat it.

@Lastaapps
Copy link
Contributor

Would be cool (not necessarily useful) that when you start tracking, the app schedules an alarm in your default clock app using the AlarmClock.ACTION_SET_ALARM Intent action automatically.

@vmiklos
Copy link
Owner

vmiklos commented Aug 30, 2023

As long as this is opt-in, I don't oppose the idea. The question is what time to use for the scheduling, would that come from the "ideal sleep length" setting?

@clicky6
Copy link

clicky6 commented Dec 7, 2023

Would be cool (not necessarily useful) that when you start tracking, the app schedules an alarm in your default clock app using the AlarmClock.ACTION_SET_ALARM Intent action automatically.

For Now I have widget of Warpclock app for that. So just 2 taps on both the widgets of Pleestracker & Warpclock and it's done.

@vmiklos
Copy link
Owner

vmiklos commented Dec 7, 2023

Are you interested in adding this yourself? I don't really have a use case for this, but I don't mind taking a PR.

@Uniel
Copy link

Uniel commented Feb 29, 2024

I too, am interested in this feature.

  • I find having my wake-up alarms, separated from my system clock, makes them easier to manage.
  • The option to customize wake-up alarms to be more gentle, like mentioned in this comment, would also be nice.
  • This would probably also play rather nicely with the implementation of the bedtime reminders mentioned in Add reminders to start/stop tracking of regular sleeps #382, where it could fire the bedtime-reminder notification either at a static time, or based on the ideal sleep length + user-defined offset.
    These are features I'm really happy with in Sleep As Android, and the reason I'm having a hard time ditching it.
    So though I don't know when, and how much, I'll be able to work on it, given school and work, I would be happy to look into implementing it, if no one else manages to do so first.

@vmiklos you mention it should be an opt-in feature. Based on the other comments I read on this repo, I think that is the right call. Do you have thoughts on how (or how not) to make the alarms accessible, without cluttering/annoying users, not interested in these features?

@vmiklos
Copy link
Owner

vmiklos commented Mar 1, 2024

Do you have thoughts on how (or how not) to make the alarms accessible, without cluttering/annoying users, not interested in these features?

I guess one option is to add one more row in the settings activity. Most users should never set anything there, so it's fine to have a lot of settings there. Once once you enable the setting, it should ask for the alarm permission, etc.

The other complexity is tests: as you add more and more optional behavior, it becomes more and more hard to test all combinations. If somebody has an idea around the FIXME in

val startStop = onView(withId(R.id.start_stop_layout))
// Start.
startStop.perform(click())
// Stop.
startStop.perform(click())
// Read number of created sleeps.
assertEquals(1, database.sleepDao().getAll().size)
// FIXME UI is not yet updated, how to wait for this?
// val sleepsCount = onView(withId(R.id.fragment_stats_sleeps))
// sleepsCount.check(matches(withText("1")))

that would be interesting, since that trouble blocks getting closer to "every fix comes with a test", which would be my ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needinfo Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants