[SOLVED] Idle mode using native sdk
I am in process of creation of an app using Qt 5.2.1 so I cannot rely on Official BB Qt components.
So, as I have done for vibration (that works), I am trying to do the same for screen idle, but without success; this is my code (extracted on official bb example):
screen_create_context(&screen_ctx, SCREEN_APPLICATION_CONTEXT); screen_create_window(&window_id, screen_ctx);
This doesn't work!
For those who need to work this job out, you can just use:
int idle = inhibit ? SCREEN_IDLE_MODE_KEEP_AWAKE : SCREEN_IDLE_MODE_NORMAL;
screen_set_window_property_iv((screen_window_t)myWinId, SCREEN_PROPERTY_IDLE_MODE, &idle);
myWinId is just a QWindow's function (inherited by QQuickWindow, QmlApplicationViewer and so on...)