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
yogeswaran
Posts: 69
Registered: ‎07-30-2009

How To find the TOP MOST visible application

Hi all ...

 

           Is there's a way to find the current application running in the foreground .... Using the application descriptor API, i can find the list of all currently running application in the stack ... But i cant find the top most visible application in the stack....is there is anyway to do so .........:smileyhappy: 

Please use plain text.
New Developer
jeyaprakash
Posts: 33
Registered: ‎07-16-2008

Re: How To find the TOP MOST visible application

Hi

         you can with getForegroundProcessId().  this method returns foreground id which is currently in foreground . look at the Applicationmanager api ...

 

this may help you..

 

                    boolean isFrontonstack = manager.getProcessId(descriptors[i]) == manager.getForegroundProcessId();

 

 

 

Please use plain text.