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

Adobe AIR Development

Reply
Highlighted
Contributor
Posts: 13
Registered: ‎03-16-2011
My Device: Curve
My Carrier: Rogers
Accepted Solution

Event's for minimizing/focusing on App

Hey guys. I'm looking through the qnx API and I'm trying to find an event for when an app gets minimized, and when it gets focused on again.

 

I assume it was in qnx.events, but either I'm not looking right, or it's not there.

 

Can anyone help me with this?

 

Thanks

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

Re: Event's for minimizing/focusing on App

Use flash.events.Event.DEACTIVATE for any situation where the app is minimized or switched away from, and ACTIVATE comes when it goes back to fullscreen.


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!
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Event's for minimizing/focusing on App

I should note that there's a bug involving these events, which you can work around easily.  I reported it as TABLET-86 (possibly not visible publicly yet as it's still in "triage"). 

 

The ticket content reads "After getting the initial Invoke and Activate events, when the user first clicks anywhere inside the screen area the app will receive one redundant Activate event. See full report in this forum message: http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Redundant-ACTIVATE-event-upon-fir...

 


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!
New Contributor
Posts: 8
Registered: ‎06-03-2011
My Device: Playbook Developer

Re: Event's for minimizing/focusing on App

I find that Event.DEACTIVATE doesn't fire when minimized, but when another another application is maximized instead.

 

That's also the gist I get here:

http://docs.blackberry.com/en/developers/deliverables/23959/Managing_your_app_through_its_lifecycle_...

 

"Event.DEACTIVATE when another application receives the foreground"