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
Developer
pyth
Posts: 506
Registered: ‎01-19-2011
My Device: My Trusty Red Plane
Accepted Solution

BB10 Alpha background mode

Hi everyone,

 

for all of you who have already installed the latest firmware version on their Dev Alpha- devices:

Take for example the calender application. If you noticed, when the app is swiped to the background, the view switches to a different view when it is swiped to the background. In background mode, the calender shows the upcoming events

 

Question is: Have you implemented that already? If yes, how did you do it? If no, how would you do it? (I actually have no idea, I just noticed it today ... my guess is it is something like getting the event that the application is pushes to background and then just showing a different view? Not like there's some special event in the latest SDK, but plain old stage.addEventListener(Event.DEACTIVATE, function(e:Event):void {showMyBackgroundView();}):smileywink:

But even then, the question is what view to show if other BB10 devices will have different resolutions...Haven't tried it yet, but if anyone could confirm that, that would be great

 

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: BB10 Alpha background mode

You have to use the QNXCover logic found here:
https://developer.blackberry.com/air/apis/bb10/qnx/system/QNXCover.html

Have not tried it, but you need to listen to the cover enter, exit and size events to then render to the app view when minimized.
Please use plain text.
Developer
pyth
Posts: 506
Registered: ‎01-19-2011
My Device: My Trusty Red Plane

Re: BB10 Alpha background mode

Thanks a lot for the info! But judging by the API, it doesn't seem possible to specifically create and set a new view as cover image, right? I cannot just create a new view with the latest information to my app while also defining the background/colors etc. . Also, it doesn't seem possible to update that background view once in a while :-/ (like a widget on android. which would be a great addition for any rss-feed or weather app)

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: BB10 Alpha background mode

Yes you can. You need to bring your app out of sleep periodically to update the view. They suggest not to do this too often, but the demos and tutorials that I have seen, does address this.
Please use plain text.
Developer
pyth
Posts: 506
Registered: ‎01-19-2011
My Device: My Trusty Red Plane

Re: BB10 Alpha background mode

Then I guess I'll have to give it a try. Thanks for the heads-up!

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o
Please use plain text.
Developer
navikun
Posts: 43
Registered: ‎11-19-2010
My Device: Blackberry Tour

Re: BB10 Alpha background mode

Incase you didnt see this post, there is a link to an example:

 

http://supportforums.blackberry.com/t5/Adobe-AIR-Development/BB10-Active-Frames-Sample/td-p/1931169

 

Please use plain text.