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
Contributor
Posts: 21
Registered: ‎09-23-2012
My Device: BB10 Dev Alpha Device
My Carrier: Vodafone

Using Services???

 Can anyone please help me on how to create a background service just like Android Services in Cascades??

Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Using Services???

welcome to the support forums.

background services are currently not possible, as RIM wants devs to use events as much as possible.
they will be made available at a later date, most likely this is quite some time away (mid 2013)
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Using Services???

Dhanya, can you explain what you're trying to use a "background service" for? There may well be alternative approaches available now, which aren't available to Android, to do what you need. Please explain in more detail what your "use case" is.

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: 4
Registered: ‎05-25-2012
My Device: Blackberry Curve 9320
My Carrier: Rogers/Wind

Re: Using Services???

I know you asked Dhanya but one use case is a third-party alarm app.
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Using Services???

Thanks AfzalivE. I do realize there are valid use cases, but I was wondering specifically about the OP's use case.

RIM is aware there are use cases as well, but they're gradually trying to cover as many of them as possible *without* actually resorting to background services, even though they know in the long run those are useful as well. They just believe (as I understand it) that they've been overused and misused in the past, so they want to cover off the other cases first.

Alarms are an easy thing to handle with a system service which wakes up the app at the appropriate time. I'm pretty confident they'll support that before background services, and it completely removes the need to use a background service for that particular case.

Whether there's an equally straightforward current or expected way to support the OP's use case remains to be seen.

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!
Highlighted
Contributor
Posts: 21
Registered: ‎09-23-2012
My Device: BB10 Dev Alpha Device
My Carrier: Vodafone

Re: Using Services???

Hi peter9477,

        Thank you so much for the help Smiley Happy !!!! Even i too had a similar task as that of AfzalivE . Hoping that the solution for it will be available from RIM soon Smiley Happy

New Contributor
Posts: 6
Registered: ‎03-28-2013
My Device: BBZ10
My Carrier: Airtel

Re: Using Services???

Hi Peter,

 

I am also developing a custom alarm app.

We have used QTTimer to trigger an alarm after a certain interval of time. But this timer seems to fail when the app goes to deep sleep mode.

The issue is that the timeout method of Timer did not even get fired until the the device is brought the active state.

 

You have mentioned that we can do such things without even using background services. Can you please help me out with the system services to serve my purpose.

 

thanks