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
Regular Contributor
_NishantShah
Posts: 76
Registered: ‎07-31-2012
My Device: Blackberry

Run application in background

Hi all,

 

Is there any api to run application in background like we have services in Android?

 

Regards,

Nishant Shah

Developer
ekke
Posts: 1,558
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Run application in background

not yet.

 

but you can use the InvocvationFramework to provide functionality via Cards as Viewer, Composer, Picker, ....


This application will be visible for the user, but you can open the app with a Page describing the Features of the App and that this app should only be opened by other apps through Invocation Framework

 

Then from other Apps you can invoke this app

The InvocationFramework will not make the App visible (if invoked as Card), so its like a Service in the background

InvocationFramework manages a Pool for your invoked app, so it can be that there are more then one instances invoked from different client apps. This is important to know if you store data in sandbox of invoked app

 

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Run application in background

_NishantShah, there's a handy Forum Search feature here, which could easily answer the question. Type "background service" in the search box near the upper right corner and you should find dozens of past threads with discussions about this. There's no new information to add yet.

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
raffi
Posts: 154
Registered: ‎06-23-2012
My Device: Z10 & Z30

Re: Run application in background

Technically wouldn't setting the "Run in Background" permission on the app allow the app to run in the background? I use this in my app to allow code to continue running while the user does other things.

Granted, it doesn't keep the app running if they explicitly quit it, if that was the question. For that, you'd need to use the push framework.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Run application in background

raffi, that may work for him. I didn't mention it because (a) it's in the other threads, and (b) he specifically mentioned "services". I suppose if on Android that's the only way to get *any* background ability, then it's good to point out that permission for those new to BB10.

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
raffi
Posts: 154
Registered: ‎06-23-2012
My Device: Z10 & Z30

Re: Run application in background

Yeah, I wasn't sure about "services" either, but I figured it was just the term he knew from Android.
Regular Contributor
_NishantShah
Posts: 76
Registered: ‎07-31-2012
My Device: Blackberry

Re: Run application in background

Thanks for replying. I am looking for a way to keep a service running even if user quits the application.

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

Re: Run application in background

That's what I thought... so those other threads the search feature will find would have all the answers you'd ever want (except the one that says "yes, you can do it").

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
rcebryk
Posts: 84
Registered: ‎12-01-2012
My Device: 9790

Re: Run application in background

In this case the only way is PushService.

Lublin BlackBerry Developer Group


---
If I helped you please mark my response as solution or "Like" it.