Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 40
Registered: ‎04-01-2009
My Device: Torch 9810

WebWorks screen context in native extension

I am trying to build a native extension for WebWorks (BB10) to control screen timeout in my app.


Ideally I'd like to set a longer timeout when my app is in foreground, but without affecting the timeout settings of the device itself. I can see SCREEN_PROPERTY_IDLE_TIMEOUT in <screen.h>, which I hope could be used for this purpose.


If that is not possible, the other approach would be to set the screen to SCREEN_IDLE_MODE_KEEP_AWAKE and back to SCREEN_IDLE_MODE_NORMAL based on timing controlled by the JavaScript code.

 

I got as far as

  (a) getting memoryJnext sample work in my app and

  (b) finding screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_IDLE_MODE, &idle_mode) code snippet.


The question is how do I assign WebWorks app windows context to screen_win?