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

Native Development

Reply
Regular Contributor
_NishantShah
Posts: 76
Registered: ‎07-31-2012
My Device: Blackberry

Need to fetch a signal when device is woken up from sleep mode

Hi,

 

I am developing an camera application. When device goes into sleep mode, camera also goes into stand by mode. I want to start camera again when device is woken up.

 

Is there any signal being emitted when device is woken up from sleep mode ? & is there any API to invoke camera from stand by mode?

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Need to fetch a signal when device is woken up from sleep mode

What about using the NAVIGATOR_WINDOW_ACTIVE and NAVIGATOR_WINDOW_INACTIVE events from here? https://developer.blackberry.com/native/beta/reference/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.lib_r...


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
BlackBerry Development Advisor (Retired)
gperry
Posts: 138
Registered: ‎05-11-2012
My Device: Developer

Re: Need to fetch a signal when device is woken up from sleep mode

Did this work for you?

 

Regards

Graham

 

Regular Contributor
_NishantShah
Posts: 76
Registered: ‎07-31-2012
My Device: Blackberry

Re: Need to fetch a signal when device is woken up from sleep mode

Hi,

 

I tried NAVIGATOR_WINDOW_INACTIVE, NAVIGATOR_WINDOW_ACTIVE & NAVIGATOR_WINDOW_STATE, but couldn't fetch any of them. I couldn't even fetch the NAVIGATOR_EXIT event.

 

My application is locked in landscape mode. So, I guess either navigator events stops emiting signals in landscape mode or I hve made silly mistakes. Right now, I have stopped working on this & waiting for next SDK release.

 

Regdars,

Nishant Shah

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Need to fetch a signal when device is woken up from sleep mode

Those three would work, unrelated to whether or not you had the orientation locked. Definitely you'd get the WINDOW_STATE ones under all conditions... even a simple bottom-swipe to minimize the fullscreen app would give you a window_state message reporting the change to "thumbnail". Must be something you're doing wrong.

Also I've seen no problems with any of these in any of the releases so far. Give it another shot?

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!