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
Highlighted
New Developer
Posts: 51
Registered: ‎04-15-2013
My Device: Simulator
My Carrier: None
Accepted Solution

enter background/ return from background

I got audio working in my app. i would like to pause the audio when the user enters background and restart it when they come back from background. is there a message i can listen for?

 

right now the only messages i seem to be getting are touch messages.

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: enter background/ return from background

[ Edited ]

You can use Application's fullscreen() and thumbnail() signals...

 

http://developer.blackberry.com/native/reference/cascades/bb__application.html#function-thumbnail


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
New Developer
Posts: 51
Registered: ‎04-15-2013
My Device: Simulator
My Carrier: None

Re: enter background/ return from background

thxs for the reply. i guess i should have stated.... i am using the NDK not Qt.

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: enter background/ return from background

These are not Qt signals, they are from cascades Application class.

If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: enter background/ return from background

If you are not using Cascades at all (ie, you are building a pure OpenGL app like  a game or something), you need to use BPS and start requesting navigator events (https://developer.blackberry.com/native/reference/core/com.qnx.doc.bps.lib_ref/topic/navigator_reque...

 

Specifcally, I believe the one you want is NAVIGATOR_WINDOW_STATE 

 

https://developer.blackberry.com/native/reference/core/com.qnx.doc.bps.lib_ref/topic/navigator_8h_1b...

 

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
New Developer
Posts: 51
Registered: ‎04-15-2013
My Device: Simulator
My Carrier: None

Re: enter background/ return from background

TYVM Paul. my audio and GL view are properly not using resources now when the game becomes an icon.