icesimon's Blog

  • About Me
  • Archive
  • feeds

Posts match “ screen ” tag:

over 7 years ago

Keep Screen awake - BB10 Dev

Sometimes we need to keep our app always awake (not dim due to the Screen timeout).

How to make this happen?
The answer is ver simple :D
Jusy put the code into your QML file

Application.mainWindow.screenIdleMode = 1

(1 means KeepAwake, and 0 means Default).

Please be careful, this effect only works when the app is in full screen mode
Once you minimize the app (in Active Frame mode), the screen will still follow the screen timeout rule to dim.

Hope you enjoy this trick!

Simon

  • BlackBerry
  • BlackBerry10
  • Cascades
  • awake
  • dim
  • screen
  • QML
  • application
  • Tips
  • October 08, 2015 20:49
  • Permalink
  • Comments
 
over 7 years ago

Change Screen Brightness - BB10Dev

Sometimes we may need to change the brightness of screen in code.
How to make it happen?
Using the QProcess can help you to do that!

QString program = "bkltctl";
QProcess myProcess = new QProcess(this);
QStringList arguments;
arguments << "brightness" << "set_brightness" << "display" << "50"; (50 is the value you want).
myProcess->start(program, arguments);

PS. You may need to connect SINGAL readyReadStandardError(), readyReadStandardOutput() and finished(int, QProcess::ExitStatus) in order to get the output error or result. :)

Enjoy it!

  • BlackBerry
  • BlackBerry10
  • BB10
  • Cascades
  • development
  • screen
  • brightness
  • Modification
  • Tips
  • October 10, 2015 16:34
  • Permalink
  • Comments
 

Copyright © 2013 icesimon . Powered by Logdown.
Based on work at subtlepatterns.com.