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: 231
Registered: ‎07-09-2009
My Device: Not Specified
Accepted Solution

How to close brower?

[ Edited ]

Hi to all,

               I'm developing an application which have option to open browser within my application.. Now i want to close the browser. Is there any way to close the browser...

 

Please help me..Smiley Indifferent

 

 

Thanks,

Packiaraj M

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

Re: How to close brower?

the browser is always running in the background. you can show another page on the browser and request foreground for 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: 231
Registered: ‎07-09-2009
My Device: Not Specified

Re: How to close brower?

Hi simon,

                Thanks for ur reply.... how it is possible? Can u explain with some  example?

 

 

 

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

Re: How to close brower?

according to the API:

Browser.getDefaultSession().showBrowser()

Shows the browser if it is not already visible and displays its start page.

 

requestForeground is a method of UiApplication.

----------------------------------------------------------
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: 231
Registered: ‎07-09-2009
My Device: Not Specified

Re: How to close brower?

[ Edited ]

Once again thanks simon,

 

 UiApplication.getApplication().requestForeground(); i'm using like this...

 

Is this correct?

 

Actually i understood the concept i dont know how to use this method..

 

I'm using bb browser to authenticate my user after finishing the authentication i want to colse the browser and return back to my application....

Highlighted
Developer
Posts: 231
Registered: ‎07-09-2009
My Device: Not Specified

Re: How to close brower?

Thanks a lot simon i got the solution..Smiley Happy