09-15-2013 11:10 AM - edited 09-15-2013 11:13 AM
I'm trying to check the ambient light sensor before app starts to set the appropriate theme of the app.
So basically I need to read the sensor at the very beggining in main() function (it's important I can set the theme only there), but the sensor reader always returns undefined light.
After hours of debugging I got to the conclusion that the sensors are inittialized only after the app starts and shows the main view (why BlackBerry??? Why?), which doesn't make any sens to me.
So is there a way to read the sensors right in the main() function before the app starts?