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

Java Development

Reply
Developer
Posts: 80
Registered: ‎09-12-2009
My Device: Bold 9700
My Carrier: Vodafone UK

Consume Input from the background

Hello everyone!

 

Wondering if anyone can point me in the right direction.

 

I was wondering, if it is possible to consume input while an app is in the background?

 

If so how would i go about doing this? (similar to the way that the built in media player consumes input from the background)

 

I ask because i am also working on a media player and would like to be able to control things from the background.

 

Really appreciate any help you folks can give me. Thanks! Smiley Very Happy

Genius Development Scotland
Website: http://www.genius-dev.co.uk
Highlighted
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Consume Input from the background

Input from the background is not possible... to a point. In 5.0 RIM added a Media key listener located in the "net.rim.device.api.media" namespace.

 

It will take input if your app was the last running multi-media app, if the user opens a different multi-media app and doesn't close it then your app will not receive media key inputs.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 80
Registered: ‎09-12-2009
My Device: Bold 9700
My Carrier: Vodafone UK

Re: Consume Input from the background

Have you heard of the application called Blackbook for BlackBerry by mblware?

 

They have managed it so that a key combination from the homescreen initiates their app and it supports 4.5+

 

Surely there must be a way?

Genius Development Scotland
Website: http://www.genius-dev.co.uk
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Consume Input from the background

That is using a convenience key  - different deal.

 

The app is not listening for the key, the system is. You register the key to the app and the system starts the app when the key is pressed.