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 option to allow "Shake to reset" in SleepTimer at any time during the countdown #4825

Open
3 tasks done
Thom-Merrilin opened this issue Jan 1, 2021 · 18 comments · May be fixed by #6165
Open
3 tasks done

Add option to allow "Shake to reset" in SleepTimer at any time during the countdown #4825

Thom-Merrilin opened this issue Jan 1, 2021 · 18 comments · May be fixed by #6165
Labels
Needs: Decision Proposal and most arguments are clear, but needs a verdict. Type: Feature request

Comments

@Thom-Merrilin
Copy link
Contributor

Checklist

  • I have used the search function to see if someone else has already submitted the same feature request.
  • I will only create one feature request per issue.
  • I will describe the problem with as much detail as possible.

System info

App version: 2.1.1

App source: F-Droid

Feature description

Problem you may be having, or feature you want:

Without the vibrate option enabled in the SleepTimer, it's easy to miss the audio fadeout. This means that the sleep timer sometimes expires when I don't want it to, and I have to unlock my phone and go back into the app to resume playback.

Suggested solution:

Add an option to allow users to "Shake to reset" at anytime during the countdown, rather than only during the fadeout (last 10 seconds)

Screenshots / Drawings / Technical details:

Add a spinner to the right of the "Shake to reset" checkbox allowing users to choose between the default behaviour of "During fadeout", or the proposed new optional behaviour of "Anytime".

@Thom-Merrilin
Copy link
Contributor Author

I am working on this and will submit a pull request to implement the feature as described.

Thom-Merrilin added a commit to Thom-Merrilin/AntennaPod that referenced this issue Jan 1, 2021
… shake to reset (sleep timer) at any time during the sleep timer.

Addresses issue (AntennaPod#4824)
Addresses issue (AntennaPod#4825)

Details:
	The spinner defaults to "During fadeout" to preserve the original behaviour. If the user opts into the new behaviour by selecting "Anytime" from the spinner, they can shake the reset the sleep timer at any time during the countdown, rather than only during the fadeout. I think this is especially userful for users who do not use the "vibrate" feature of the sleep timer, as the audio fadeout alone can be quite subtle and easily missed.
	This also fixes an issue with the existing sleep timer behaviour - currently the sleep timer will not respect the user unchecking the "shake to reset" option during the fadeout, as the ShakeListener has already been registered, and the callback does not check if the user has enabled shake to reset.
@keunes
Copy link
Member

keunes commented Jan 2, 2021

Hello
Thanks for chipping in and contributing code :)

I see your issue but adding an extra option, I feel, unnecessarily clutters the interface. Wouldn't it be an idea to allow shake reset at any time rather than just the last 10 seconds (provided the timer is running and the option enabled of course)? Wdyt @ByteHamster ?

Also; is the timer currently displayed on the lock screen notification? If not, it might be useful also/instead to display the timer, and include the '+5/10/15 minutes' buttons (which were recently added to the main sleep timer screen).

@ByteHamster
Copy link
Member

Wouldn't it be an idea to allow shake reset at any time rather than just the last 10 seconds

I think this might have an effect on battery life and might be unwanted by some users (especially if you are in transit)

@Thom-Merrilin
Copy link
Contributor Author

Hello
Thanks for chipping in and contributing code :)

I see your issue but adding an extra option, I feel, unnecessarily clutters the interface. Wouldn't it be an idea to allow shake reset at any time rather than just the last 10 seconds (provided the timer is running and the option enabled of course)? Wdyt @ByteHamster ?

Also; is the timer currently displayed on the lock screen notification? If not, it might be useful also/instead to display the timer, and include the '+5/10/15 minutes' buttons (which were recently added to the main sleep timer screen).

Hello,

Thank you for your comments. I made the new behaviour optional (and non-default) as I didn't want to break anything for users that rely on the existing behaviour. Perhaps there is a more elegant way to configure the behaviour.

The notification idea is interesting, I don't think that the sleep timer is displayed on the lock screen at the moment (it doesn't display for me). While this would be a nice feature, I think it's a separate issue: users may have lock screen notifications disabled on their device. The shake to reset has the advantage of not needing to turn the screen on, which may be important for some users (e.g. if the user is trying to fall asleep).

@keunes
Copy link
Member

keunes commented Jan 2, 2021

I think this might have an effect on battery life

The shake to reset has the advantage of not needing to turn the screen on, which may be important for some users (e.g. if the user is trying to fall asleep).

These are good points (not so much being in transit - if a sleep timer is used there at all users can simply not enable shake to reset). I still feel like a setting for this is too much, though, as it is trying to 'fix' something in the app that doesn't work well in practice (rather than catering for different use cases). That doesn't really fit well with our aim to provide a simple UI.

Another proposal: is it possible to bring forward the start time of capturing shakes? E.g. start considering shakes 20 seconds before end, with a tiny vibration to indicate the start (as if touching the keyboard, like haptic feedback, which is much less intrusive than the current long vibration before end).

@Thom-Merrilin
Copy link
Contributor Author

Another proposal: is it possible to bring forward the start time of capturing shakes? E.g. start considering shakes 20 seconds before end, with a tiny vibration to indicate the start (as if touching the keyboard, like haptic feedback, which is much less intrusive than the current long vibration before end).

It should be simple to bring forward the start time of capturing shakes. I think (but I haven't tested it) that in Android versions >= 26 the vibration amplitude can be specified, but I don't think it's possible in older versions.

I think the sleep timer currently doesn't specify an amplitude, and so uses the system default (which I believe is configurable by the user in their OS settings). Deviating from this to a lower amplitude without asking may upset some users, and if we ask them then we're just replacing one config option with another.

My initial idea was that this would be a distinct behaviour. Some users would want to treat the fadeout (with vibration if enabled) somewhat like an alarm that can be "snoozed" with shaking. Other users would want to preemptively "snooze" without turning the screen on. I don't know the reality of how many users would actually appreciate such a feature though.

All that being said, without this feature there is something of a problem with the fadeout alone (without vibration) being subtle and easily missed, which brings us back to your suggestions.

I should mention that the additional spinner does not display if the "Shake to reset" option is unchecked.

Some other ideas:

  • The checkbox/spinner combo could be replaced with a spinner alone (disabled/during fadeout/anytime), but then we'd need a label or long item texts in the spinner.
  • With the "+5/10/15 minutes" buttons you mentioned, everything below those buttons could be hidden under an expandable "Options" or "Advanced" section. For most users, the default configuration would be fine and they'd never have to see the additional options, but those who wish to customise further can still do so easily.

@ByteHamster
Copy link
Member

is it possible to bring forward the start time of capturing shakes? E.g. start considering shakes 20 seconds before end, with a tiny vibration to indicate the start

Isn't that what we already do? We vibrate, start lowering the volume and capture shakes.

Other users would want to preemptively "snooze" without turning the screen on. I don't know the reality of how many users would actually appreciate such a feature though.

To be honest, I don't think there are many users who want this (also given that no one has indicated interest during the last year. In order to keep the app simple and not overloaded with features, I would vote to not implement this.

@ByteHamster ByteHamster added the Needs: Reply Issue or PR is awaiting follow-up, as requested by project maintainers. label Apr 9, 2022
@github-actions
Copy link

This issue will be closed when we don't get a reply within 15 days.

@ImKadaga
Copy link

I would like this feature to be implemented.

@github-actions github-actions bot removed Needs: Reply still Needs: Reply Issue or PR is awaiting follow-up, as requested by project maintainers. labels Apr 26, 2022
@debuglevel

This comment was marked as off-topic.

@debuglevel

This comment was marked as off-topic.

@ByteHamster

This comment was marked as off-topic.

@debuglevel

This comment was marked as off-topic.

@ByteHamster

This comment was marked as off-topic.

@ByteHamster ByteHamster linked a pull request Oct 29, 2022 that will close this issue
@Fruchtzwerg94
Copy link

Fruchtzwerg94 commented Oct 29, 2022

I know the feature of a lot of other audio book and podcast players. So I really miss it here too. Would be great to get it in.
Think about you are listening and not near to your phone if fading out. Also you may want to extend the duration without unlocking the phone if not already at fading out.
I've created the PR #6165 which allows to enable the feature optionally. Works like a charm for me.
Any doubts not to do it?

@keunes keunes added Type: Enhancement Needs: Decision Proposal and most arguments are clear, but needs a verdict. labels Sep 3, 2023
@ByteHamster
Copy link
Member

Also you may want to extend the duration without unlocking the phone if not already at fading out.

How would that work? Do you then remember to shake your phone every few minutes just in case it might be near the end of the countdown?

@Fruchtzwerg94
Copy link

Fruchtzwerg94 commented Oct 29, 2023

Also you may want to extend the duration without unlocking the phone if not already at fading out.

How would that work? Do you then remember to shake your phone every few minutes just in case it might be near the end of the countdown?

Indeed, thats exactly the usecase. I know and love it e.g. from the Smart Audio Book Player. This way, I can extend the countdown whenever I want and not only at the end of it.

@debuglevel
Copy link

debuglevel commented Oct 29, 2023

Smart Audio Book Player:

  1. Sleep timeout set to 30 minutes.
  2. Lying in bed, trying to sleep.
  3. You have a certain feeling it's probably about 15-20 minutes after you shook it the last time.
  4. You shake it.
  5. Done.

Best app I'ever used. It just works.

/edit:
LOL. I just saw I already explained how this feature works and it was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Decision Proposal and most arguments are clear, but needs a verdict. Type: Feature request
Projects
None yet
6 participants