[SailfishDevel] Preventing auto sleep and detecting sleep mode
Ove Kåven
ovek at arcticnet.no
Thu Feb 20 23:29:01 UTC 2014
Den 20. feb. 2014 19:16, skrev Arvid Fahlström Myrman:
> Well, I've at least solved the first problem by implementing a timer similar to
> the one used by ScreenBlank in Sailfish.Media (see
> /usr/lib/qt5/qml/Sailfish/Media/ScreenBlank.qml for reference), and it seems to
> work properly. I wonder though, how are we developers supposed to know about
> these DBus services? Are they documented somewhere?
Similar questions have already been answered in the past on this list,
at least. From the answers I got earlier, I understand that
- all the MCE D-Bus calls are documented in
https://github.com/nemomobile/mce-dev/blob/master/include/mce/dbus-names.h
- there's a more friendly API under development at
https://github.com/nemomobile/nemo-keepalive, which seems to have both
C++ and QML interfaces (which both does exactly what you're asking for,
including telling you when the screen goes blank). Presumably, when it's
ready and deployed, that is what Jolla will tell developers about, and
allow imports of.
In the meantime, you may just have to write some C++ code that you can
use from your QML (or copy what you need of that nemo-keepalive into
your C++ code).
More information about the Devel
mailing list