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: 126
Registered: ‎06-08-2009
My Device: Not Specified

Problem while invoke Browser to foreground.

Hi,

 

In my application i am trying to invoke Browser when click on menuitem. but it invoke browser on background and my app on foreground i need the exact opposite case. Browser on foreground and app in background.

 

code snippet is as follows -

protected void makeMenu(Menu menu, int instance){ menu.add(new MenuItem("Show Browser",1,100){ public void run(){ try{ BrowserSession browserSession = Browser.getDefaultSession(); browserSession.displayPage(url); browserSession.showBrowser(); }catch(Exception e){ System.out.println("Exception :: "+e.toString()); } } }); }

 Can anybody help me.

 

Developer
Posts: 16,932
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Problem while invoke Browser to foreground.

i have noticed the same thing, at least on some OS versions. on others it works as desired.
you can try to call requestBackground in your app.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 126
Registered: ‎06-08-2009
My Device: Not Specified

Re: Problem while invoke Browser to foreground.

I tried requestBackground method but it's not work.

 

UiApplication.getUiApplication().requestBackground();  

 

Currently i working on storm. 

Developer
Posts: 126
Registered: ‎06-08-2009
My Device: Not Specified

Re: Problem while invoke Browser to foreground.

Can anybody help me...
Developer
Posts: 126
Registered: ‎06-08-2009
My Device: Not Specified

Re: Problem while invoke Browser to foreground.

On debug i found this -

 

FocusHistory: Focus gained; //Currently focus on my application

 

>> When i click on browser menuItem then Focus is -

 

FocusHistory: Focus lost; App Browser; Component NULL

 

quickly it lost focus and my app got the focus..

 

I tried out both Foreground and background method both are not working.

Highlighted
New Developer
Posts: 32
Registered: ‎04-30-2009
My Device: Pearl 8120

Re: Problem while invoke Browser to foreground.

Has anyone managed to address this issue?

We are seeing this on Storm, where it does not appear at all on other platforms.

Application is built with 4.3 APIs.