Skip to content

feat: Added flip to snooze #741

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

Merged
merged 2 commits into from
Mar 23, 2025
Merged

feat: Added flip to snooze #741

merged 2 commits into from
Mar 23, 2025

Conversation

TejasBaid
Copy link
Contributor

Implemented Flip to Snooze Feature with Configurable Settings

Description

This PR introduces the Flip to Snooze feature, allowing users to snooze alarms by flipping their device. Since this is a frequently used feature in alarm apps, I’ve ensured it is well-tested and configurable in the settings, with a default value of false.

Proposed Changes

  • Added Flip to Snooze functionality using device motion sensors.
  • Made the feature configurable under settings (default: false).
  • Ensured smooth user experience by handling edge cases.
  • Fully tested for reliability and responsiveness.

Fixes #688

(This PR resolves issue #688)

Screenshots

ScreenRecording_03-14-2025.07-48-02_1.MOV

@inderjsingh
Copy link
Contributor

@TejasBaid Will it work if I let my device already in flipped position?

@TejasBaid
Copy link
Contributor Author

@inder-7 Yes it works if the phone is already in a flipped position

@MarkisDev
Copy link
Collaborator

Hi, thanks for contributing! Could you resolve the conflicts? I think this would be a great addition to the application.

@TejasBaid
Copy link
Contributor Author

@MarkisDev Conflicts resolved

@MarkisDev MarkisDev merged commit 82cd3a5 into CCExtractor:main Mar 23, 2025
1 check passed
@inderjsingh
Copy link
Contributor

Hi! @MarkisDev and @TejasBaid

I was assigned to this issue and noticed that the merged PR isn’t fully functional.

It currently snoozes even if the device is already face down, rather than only when flipping from face up to face down.

Also, when the device is already flipped, it gets stuck on the snooze duration screen which displays only 00:00 and how can user select snooze duration if its face down.

I’ve fixed these issues in my own implementation. My PR #780 makes it work so that snoozing only triggers when the device transitions from face up to face down — not when it’s already face down.

Additionally, to prevent making the user too comfortable with repeated snoozing, I’ve set the default flip-to-snooze duration to just 1 minute, so they’re gently disturbed again and encouraged to wake up.

@TejasBaid
Copy link
Contributor Author

Hi @inderjsingh ,
I understand that the issue was assigned to you but the implementation where snoozing triggers even when the device is already face down is not a bug, it is the general implementation of the feature
Google's "flip to shh" was implemented the same way since people who use the feature have a tendency to want the device to be in a 'do-not-disturb' mode when kept face down.

@inderjsingh
Copy link
Contributor

@TejasBaid Thank you for clarifying! I completely understand the reference to Google's "flip to shh."
However, I believe that for an alarm snooze feature, triggering when the device is already face down can cause confusion or accidental snoozes — especially if someone keeps their phone face down overnight.

In my proposed fix, the snooze triggers only on the transition from face up to face down, which adds intentional user interaction.

Also, I’ve set a default flip-to-snooze duration of just 1 minute to gently remind users that it’s only a short snooze and help avoid oversleeping.

I completely understand if the current behavior is by design, but I’d be happy to submit my PR as an optional enhancement if you’d like!

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

Successfully merging this pull request may close these issues.

Feature: Flip to Snooze
3 participants