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

Android™ Development

Reply
Developer
Developer
Posts: 324
Registered: ‎05-26-2009
My Device: Not Specified

Background service started from an activity - supported or not?

Can someone please confirm whether or not the following is supported in Android runtime for playbook?

 

1.) A background service that does the following?

  • issues notifications
  • requests location updates

 

The background service is  launched from an activity and *is supposed to run even after the activity that launched it is destroyed/finished*.

 

Thanks,

 

--MB.

Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: Background service started from an activity - supported or not?

- issues notifications - should work, but they will appear as native qnx (not as standard android phone/tablet, upper left corner will glow red).
- requests location updates - don't know about this.

But after destroying the main activity(program), I think that android runtime closes itself. Correct me if I'm wrong.
Developer
Developer
Posts: 324
Registered: ‎05-26-2009
My Device: Not Specified

Re: Background service started from an activity - supported or not?

For apps like radio (playing music), which need to run in the background, they need to be implemented as a service.  This allows the service which is playing music to run in the background even after the activity that launched the service is destroyed etc.