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
haoransd
Posts: 64
Registered: ‎08-07-2008
My Device: Not Specified
Accepted Solution

bring a application to foreground and background

I invoke rim video recorder from my application. I have a file Listener listening to the file system to check if any new file is added. Once recording is done, I want to either bring my own application on to the top of screen or take the video recorder to background.

 

So, 3 Questions:

1. how to bring my application foreground;

2. how to take an application background;

3. If my application want to display a msg on the top of the other application( eg. on top of rim's video recorder), is it possible. For example, when battery is low, BB will alert a dialog saying " battery low, radio is turned off" on the top of any other applicaiton, how to display such a alert on the toppest screen, ie. that can be even on the top of other invoked applications.

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: bring a application to foreground and background

1. Application.getApplication().requestForeground();

2.  This is a more interesting one.  To push an Application to the background you need to issue the requestBackground() to that applications Application class. It might be that the File System listener will run with the Video Recorder application in control, but I doubt it.  Otherwise I'm not sure how you are going to find the Application to do a requestBackground, or if you even can.

3. Yes - you can push a global screen.  Have a look in the Developer KnowledgeBase and search for "global screens" for more details.  Look round here for the link to the Developer KnowledgeBase and other useful stuff.

http://na.blackberry.com/eng/developers/.

Please use plain text.