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
Developer
Posts: 426
Registered: ‎04-10-2011
My Device: Z30

Work in background when app is deactivated

Hy!

 

I know that apps are deactivated and can't do anything when the user switches to another app, unless the multitasking preference is set to showcase.

Nevertheless I wanted to ask if there is another mechanism to work in background. For example, when you have a twitter client and you change to another app, it would be nice to be able to refresh the tweeds in the background and notify the user about updates, not only when he actively checks.

 

Anything possible yet? Or does anybody know about plans for an API to support such background services?

Would be really nice because otherwise the PlayBook is not a real multitasking device like the iPhone once was. Even if there's the showcase mode an app developer can't rely on that. because it's a set by the user.

Supporting multiple modes is no option, because e.g. most users want a mail client that notifies them about new mails. They don't want to check manualy every time they suspect a new mail arrived.

Forcing them to use the showcase mode isn't an option either, because why should all apps kepp running, when you just need certain small background services.

 

Regards,

Dustin

-----------------------------------------------------------------------------
Check out my apps in the BlackBerry World
Visit my developer blog alopix.net
BBM Channel: C0047B612
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Work in background when app is deactivated

You are looking for the QNXSystemPowerMode stuff.

 

It's not the same as a background service: your app still needs to be launched by the user and running, but it doesn't have to be visible or the "active" app.

 

I've used the features in there for both White Noise (which keeps playing its sound even when you put the tablet to sleep) and Battery Guru (which continues to record battery level, voltage, power, and other readings even when inactive or the tablet is sleeping).  This stuff works great, and if more apps used it, there'd be little or no reason to need the Standby timeout to be longer than 5 minutes.


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: 426
Registered: ‎04-10-2011
My Device: Z30

Re: Work in background when app is deactivated

Thanks for the hint Smiley Happy

But nevertheless background services without having to have an app open would be nice - so e.g. the music app didn't have to be open.
-----------------------------------------------------------------------------
Check out my apps in the BlackBerry World
Visit my developer blog alopix.net
BBM Channel: C0047B612
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Work in background when app is deactivated

Agreed about services. I expect to see something like that at some point, but it may be a while yet. At the very least, we'd probably see some full notification support first, since that's likely a precursor to having viable services in many cases.

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!