How can I prevent the backlight of the screen from dimming and going off?
Thanks![]()
How can I prevent the backlight of the screen from dimming and going off?
Thanks![]()
MCE provides a method call for this:
http://maemo.org/api_refs/5.0/5.0-fi...23a31866455b80
Is there any sample code how to use MCE_PREVENT_BLANK_REQ dbus method ? i am quite new to maemo development and dont know how dbus works?
DBus is not Maemo specific
http://qt.nokia.com/doc/4.6/qdbusinterface.html#details
QSystemInfo API from the Qt Mobility project has a function to do this.
QSystemScreenSaver::setScreenSaverInhibit()
Will inhibit the blanking for the life of the QSystemScreenSaver object
Code Monkey, QtMobility, Nokia
Actual Debian packages are located in extras-devel repositories:
http://repository.maemo.org/extras-d...q/qt-mobility/
The only problem is the current status of Qt Mobility for Maemo 5 doesn't really look good:
http://qt.nokia.com/doc/qtmobility-1...-compatability
Last edited by divanov; 2010-02-24 at 10:20. Reason: Information update
I found following code after doing some research.
#include <QtDBus>
#include <mce/mode-names.h>
#include <mce/dbus-names.h>
QDBusConnection::systemBus().call(QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH,
MCE_REQUEST_IF, MCE_PREVENT_BLANK_REQ));
I don't know why do you need to do any research as I've already given the link to an answer.
Code:#include <QtDBus> #include <mce/mode-names.h> #include <mce/dbus-names.h> QDBusInterface mce(MCE_SERVICE, MCE_REQUEST_PATH, MCE_REQUEST_IF, QDBusConnection::systemBus()); mce.call(MCE_PREVENT_BLANK_REQ);