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

Posts: 69
Registered: ‎07-30-2009
My Device: Not Specified

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 .........Smiley Happy 

New Developer
Posts: 33
Registered: ‎07-16-2008
My Device: bold

Re: How To find the TOP MOST visible application


         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();