Notices


Reply
Thread Tools
velox's Avatar
Posts: 291 | Thanked: 939 times | Joined on Dec 2009
#1
Hi all,
I made a thing and would love you to tell me if it works for you:

slumber is a sleep timer program for SailfishOS with sensors support.

This means you can use the accelerometer or proximity sensor to reset the timer if the display is lit: Just place your device on your bed and slap the mattress in it's general direction to reset the timer. If the display is off, tapping the screen thrice to "wake up and reset" in one go works reasonably good as well.

It's designed to pause local media players or Kodi/VLC via network.
If your device supports it (Jolla1 does not), aliendalvik/android media players shown on the lock screen should work, too.
Optionally, an audible notification plays for the last few seconds before pausing your media.

Please let me know if it works for your favourite Player.



Known restrictions:
- Does not work with Android media players on jolla1 phone.
- Does not work in Sailfish Browser (working alternative: WebPirate Browser)
- Sensors won't work when Display is off. But there is an option to keep it on while the timer runs. (If you know how to fix: please tell me!)
- Phone Vibration might trigger Accelerometer. (Well…)

Install
- https://openrepos.net/content/velox/slumber (most recent builds)
- from Jolla Store (old aka. stable)
- build it yourself after getting it on github


Changelog don't waste your bandwidth if you don't think it's worth it

* version 0.7-1
- user request: fade local volume to zero
- translation updates

* version 0.6-3
- new translation: Dutch (thanks pljmn!)

* version 0.6-2
- new translation: Slovenian (thanks sponka!)
- user request: Long press in main view opens timepicker (no need to go through settings anymore)
- appearance: Typography: Time Strings not subscript anymore
- appearance: Slightly smaller text on tablet
- spanish translation update

* version 0.6-1 (in jolla store)
- bugfix: app start does not change system volume anymore

* version 0.5-6
- enhancement: "keep display lit" timer duration decrease
- translation update russian (thanks ancelad)

* version 0.5-5
- bugfix: "keep display lit" does not time out anymore

* version 0.5-4
- translation update swedish (thanks eson)

* version 0.5-3
- new translation: russian (thanks ancelad!)
- polish translation update (thanks atlochowski!)

* version 0.5-2
- new translation: polish (thanks atlochowski!)

* version 0.5-1
- Works with some android players (if you see lock screen controls with an android app, slumber should be able to pause it, as well). As you'd expect, this feature does not work on the jolla one.

* version 0.4-5
- Thanks to ria88 for the finnish translation!
- player support: talefish & "qtmpris" used by vlc remote

* version 0.4-4
- new translations:
- spanish (thanks CepiPerez!)
- swedish (thanks eson!)

* version 0.4-3
- moved source to github
- new: kodimote support as "local" player (you don't need to configure Kodi in slumber if kodimote is connected.)
- added support for unplayer

* version 0.4-2
- annoyance fix: display correct entry in options if "shaking" was selected before v0.4
- packaging: app icons for future tablet release
- really minor performance enhancements

* version 0.4-1
- new option: disable bluetooth when timer runs out (thanks: marxian & coderus)
- new option: keep display lit while timer is running
- new option: darken main application screen while timer is running
- user request: optional visual indicator before timer runs out
- user request: stronger acceleration needed to trigger "shaking"
- user request: new, even stronger shaking option "earthquake"
- ui tweaks (new sub page for appearance options, VerticalScrollDecorators on options pages)

Last edited by velox; 2017-03-22 at 18:27. Reason: updated description
 

The Following 17 Users Say Thank You to velox For This Useful Post:
Ancelad's Avatar
Posts: 1,400 | Thanked: 2,557 times | Joined on Jun 2012 @ Russia, 96
#2
Please, fix button-width It is too big...
__________________
Twitter: @iAncelad
Try my SailfishOS theme for Nokia N9
 

The Following User Says Thank You to Ancelad For This Useful Post:
velox's Avatar
Posts: 291 | Thanked: 939 times | Joined on Dec 2009
#3
Originally Posted by Ancelad View Post
Please, fix button-width It is too big...
Yay, if Button Layouts are the worst thing anyone notices, that's a pretty good sign.
It looks a bit weird on Landscape, though, good point. On Portrait, I think it's actually prettier than automatic width, but I'll just change it and get over it. Thanks for taking the Time and giving Feedback!
 
velox's Avatar
Posts: 291 | Thanked: 939 times | Joined on Dec 2009
#4
v0.2 is uploaded to warehouse & first post is updated. Buttons are much narrower now
 

The Following User Says Thank You to velox For This Useful Post:
Posts: 187 | Thanked: 511 times | Joined on Nov 2014
#5
Killdroid in the Jolla store can restart the Alien Dalvik system, as long as you've given it your root password.

Makes me wonder if you could use that (or the same mechanism) to shut all Android apps. It'd have to be a setting - it's a pretty blunt way of turning off the radio

ETA - there's also this http://talk.maemo.org/showthread.php?t=96085
 

The Following User Says Thank You to MikeHG For This Useful Post:
CepiPerez's Avatar
Posts: 1,023 | Thanked: 4,416 times | Joined on Feb 2010 @ Argentina
#6
nice app, but doesn't work for flowplayer
how does it work? dbus? I can add whatever you need, just let me know
__________________
Filebox / FileCase for Maemo / Harmattan / Sailfish
FlowPlayer for Maemo / Harmattan / Sailfish
Whatsup for Harmattan / Sailfish
CallBlocker for Harmattan

Support my work:
Paypal / Bitcoin
 

The Following 4 Users Say Thank You to CepiPerez For This Useful Post:
velox's Avatar
Posts: 291 | Thanked: 939 times | Joined on Dec 2009
#7
Originally Posted by MikeHG View Post
Killdroid in the Jolla store can restart the Alien Dalvik system, as long as you've given it your root password.

Makes me wonder if you could use that (or the same mechanism) to shut all Android apps. It'd have to be a setting - it's a pretty blunt way of turning off the radio

ETA - there's also this http://talk.maemo.org/showthread.php?t=96085
I'll keep this in mind as a possible feature in the future. Good to know there are ways to kill dalvik and still get accepted to Jolla Store. Thanks!

Originally Posted by CepiPerez View Post
nice app, but doesn't work for flowplayer
how does it work? dbus? I can add whatever you need, just let me know
Pausing media is actually a bit of a hack right now: I just play a very short, silent .mp3 file right out of QML, which automatically pauses a lot of native players. I tried using dbus from QML when I wanted to fade out media volume before, but didn't get anywhere. Hints how to do that stuff at all (and helpful dbus methods) would be greatly appreciated…
 

The Following User Says Thank You to velox For This Useful Post:
Posts: 253 | Thanked: 1,400 times | Joined on Jul 2014
#8
Originally Posted by velox View Post
Pausing media is actually a bit of a hack right now: I just play a very short, silent .mp3 file right out of QML, which automatically pauses a lot of native players. I tried using dbus from QML when I wanted to fade out media volume before, but didn't get anywhere. Hints how to do that stuff at all (and helpful dbus methods) would be greatly appreciated…
Using MPRIS to pause the players might be a better solution for native players. Which is what the lockscreen media controls use, and so is a common API for you to hook into

http://specifications.freedesktop.or...est/index.html

https://github.com/nemomobile/qtmpris
__________________
SirenSong v0.5
Like my work? buy me a beer
 

The Following 2 Users Say Thank You to r0kk3rz For This Useful Post:
velox's Avatar
Posts: 291 | Thanked: 939 times | Joined on Dec 2009
#9
Originally Posted by r0kk3rz View Post
Using MPRIS to pause the players might be a better solution for native players. Which is what the lockscreen media controls use, and so is a common API for you to hook into

http://specifications.freedesktop.or...est/index.html

https://github.com/nemomobile/qtmpris
This is why I like this place. Thanks, I'll definitely look into that!
 
CepiPerez's Avatar
Posts: 1,023 | Thanked: 4,416 times | Joined on Feb 2010 @ Argentina
#10
Add this to your globals.qml file:

on top of page:
import org.nemomobile.mpris 1.0

Insde main Rectangle component:
MprisManager { id: mprisManager }

then when timer is triggered add this:
mprisManager.pause()

This should work for stock player and flowplayer (also cutespot uses mpris afaik)
__________________
Filebox / FileCase for Maemo / Harmattan / Sailfish
FlowPlayer for Maemo / Harmattan / Sailfish
Whatsup for Harmattan / Sailfish
CallBlocker for Harmattan

Support my work:
Paypal / Bitcoin
 

The Following 3 Users Say Thank You to CepiPerez For This Useful Post:
Reply

Tags
media, sailfishos, timer

Thread Tools

 
Forum Jump


All times are GMT. The time now is 01:29.