02-06-2013 04:40 PM
Hi
Im using the following code, which i _think_ should stop the screen from idling. Im using a DevAlphaA for testing.
viewer is a QmlApplicationViewer, and is the top level widget. The property appears to get set Ok as i confirm and print it out in the qDebug, yet the screen still sleeps.
The hide() is in there to see if hiding and showing helped, but it didnt.
Any help appreciated!
qDebug() << "On a blackberry!";
viewer->setOrientation(QmlApplicationViewer:
creenOrientationLockPortrait);
viewer->setMainQmlFile(QLatin1String("app/native/q
viewer->setResizeMode(QDeclarativeView:
izeRootObjectToView);
viewer->setGeometry(0, 0, 768, 1280);
int idle_mode = SCREEN_IDLE_MODE_KEEP_AWAKE;
int ret = 0;
WId winId = viewer->winId();
ret = screen_set_window_property_iv(screen_window_t(winI
viewer->hide();
screen_get_window_property_iv(screen_window_t(winI
qDebug() << "Idle Mode:" << idle_mode << SCREEN_IDLE_MODE_KEEP_AWAKE << ret << winId;
viewer->showFullScreen();
02-08-2013 02:18 AM
I briefly had something like that before switching to the Cascades method. A friend with a device confirmed it worked for me...
Unfortunately, it seems that I didn't actually commit that code to my repository before replacing it. ![]()
I have a feeling, though, that I used screen_set_display_property_iv(). I'm not positive, though. I know I tried controlling the screen brightness with that, but it did not work at all...
02-08-2013 10:41 AM
In Native app I would call screen_post_window() to make sure this property change 'applied' as it is of 'Delayed execution' type.
Not sure what to do with QML. Doesn't QML have some similar property? i.e. do you have to access underlying native Window to set this up?
02-08-2013 10:49 AM
Here you go - did you see screenIdleMode property of bb::cascades::Window ?
02-08-2013 04:07 PM
02-08-2013 04:08 PM
02-09-2013 11:19 PM
try flushing the screen context after you update the window properties.
you can retrieve the context from the window handle.
see :
nWindowAttached() in this file:
02-10-2013 08:22 AM
02-10-2013 09:05 AM
02-10-2013 12:05 PM
Gotta love those subtleties... Glad you figured it out!