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
Contributor
Posts: 24
Registered: ‎03-28-2011
My Device: PlayBook Developer
My Carrier: N/A

Changes to Event.DEACTIVATE in SDK/Simulator version 1.0.1 ?

Was just rebuilding my code under SDK v1.0.1 (up from 0.9.4) and running it in the new 1.0.1 simulator and my game is no longer receiving Event.ACTIVATE / DEACTIVATE events when I do an upward swipe from the bottom bezzle.  The game continues to run and doesn't pause until I side swipe left/right to another app.

 

Can someone confirm if this is expected behavior now?  Is the new way it works to allow the user to see the app still running in thumbnail until they official change focus?

 

I couldn't find info searching regarding this change.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Changes to Event.DEACTIVATE in SDK/Simulator version 1.0.1 ?

There has been many threads on this. Deactive and activate events are no longer reliable. RIM has not posted what an alternative solution is yet. Depending on what you are doing, you may need to look at an alternative solution. For example, if you are saving state on deactive, then you should save state at the time of the change or use a timer to periodically save the state.
Contributor
Posts: 24
Registered: ‎03-28-2011
My Device: PlayBook Developer
My Carrier: N/A

Re: Changes to Event.DEACTIVATE in SDK/Simulator version 1.0.1 ?

I'm mainly using them to pause the game and stop the music.  And resume both upon reactivate.

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

Re: Changes to Event.DEACTIVATE in SDK/Simulator version 1.0.1 ?

Have you switched the simulator to Showcase mode? In the General settings tab, try playing with the three settings for Application Behaviour, and see what happens with your app. Note that if users switch the mode to Showcase, they may well be expecting your game to continue running. Also note that with the Default mode, you have to actually launch another app to get the current app to deactivate, whereas in Paused mode merely minimizing it should do the job.

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!
Contributor
Posts: 24
Registered: ‎03-28-2011
My Device: PlayBook Developer
My Carrier: N/A

Re: Changes to Event.DEACTIVATE in SDK/Simulator version 1.0.1 ?

Just finally found a few threads deep the links to some system state information that I'm reading up on.  Yeah I'll go through all this Showcase/Default/Paused stuff and figure out the best case for each for my game.  

 

Everything you've described is what I've noticed.  I mean nothing is that bad in Showcase mode because it puts the control in the user's hands really.  When I use the simulator in that mode as soon as I go away from my minimized game everything quiets down and pauses nicely.  I just wanted to make sure there wasn't a BUG!