-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Sleep timer #2892
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
Sleep timer #2892
Conversation
TobiGr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! The sleep timer is a frequently requested feature. That's why, I'd like to ship it with a good UI and implementation. To achieve this, I'd like to discuss some changes.
Clean UI and UX
Users should be able to select the exact time when to put NP to sleep. This means, there should be no predefined values, but a number picker. When a timer is running and the timer button was pressed, the remaining time should be displayed.
At all: Do you think a minute picker is enough or do we also need to offer a hours/seconds picker?
Stop timer
Please add an option to stop the timer. Every time bomb has a breaker, so should our sleep timer :)
To achieve this, please make sure to only create one timer and modify it when a time is selected or a stop button was pressed. Otherwise we might end up with multiple timers when a user wants to modify the remaining time. This could cause unexpected results e.g. when one tries to extend the remaining time but instead a new timer is created having no affect because the player would be stopped earlier by the old timer.
Clean code
Make all used strings translatable using the strings.xml file. Please ensure that your changes run on all supported Android versions. KitKat (Android 4.4) handles vector drawables differently than later versions. Using them can result in a crash on those devices,
Caution when updating dependencies, Gradle etc.
Please update dependencies in a separate PR when they do not directly affect your changes. Dependency updates need to be tested and verified cautiously, because they can brake functionality. Moreover, you bumped the target SDK, although there are some problems with level 29 api devices which have not been resolved. The build fails, too, because you did not update the specs for Travis in .travis.yml simultaneously. .
|
Thanks Tobias, really appreciate your quick reply. I'll make sure these changes are implemented and I'll also look into the dependency upgrades. I'll get back to you soon. |
|
Hi, |
TobiGr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry for the delay.
app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java
Outdated
Show resolved
Hide resolved
|
Hi @TobiGr , |
TobiGr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick reply!
app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java
Outdated
Show resolved
Hide resolved
Hi @gillhash, I can provide you the APK with latest changes merged. I have added one more change recently - Thanks |
|
@javed-hussain thanks for responding. Yes, that would be great. Please upload the apk. #3043 PR (my fav) has been merged with dev branch today. Would that be included or your apk is built on latest 0.18.4 |
I'll merge the build with the latest dev and then generate the apk. So that should be included. Thanks. |
|
Please remove mp3 conversion from this PR, it is completely unrelated to the sleep timer. |
|
@javed-hussain i m using Samsung J2 Pro Android 6.0.1. |
Sure @Stypox . That changes are not related to this PR. They are for my personal use. I wanted that change so I generated the build with that. I'll remove those changes at the time of merging with main branch |
Thanks for the appreciation. If you want you can download the build from below link and This is a release build not a debug one. Thanks |
|
@javed-hussain |
|
@gillhash did you try uninstalling the previous version. |
|
Hi @javed-hussain would you Please remove mp3 conversion from this PR? ..as testing phase is starting of PRs in this Milestone. |
Sure @gillhash I'll do that. |
|
+1 for sleep timer, thanks |
|
Any progress on this feature? This is something really useful and would be amazing if it were added to NewPipe. |
Hi @RickyM7 , |
|
@javedh-dev Thank you. |
That would be great yes. The Sleep timer is a feature I am still waiting for. Would be awesome if you could add it. |
|
Closing this for now:
Feel free to reopen it when there is progress again. |
|
This is such a useful feature to have! I hope it'll eventually be picked up again. |
|
Was closed here: #2830 |
I checked the app linked there and is a very nice solution, thanks! |
Hi all,
I have updated the target SDK version to 29 and a few other dependency versions to its latest.
I have also added a sleep timer similar to Spotify in background player.
Please review the changes and merge.