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
Regular Contributor
Posts: 75
Registered: ‎05-27-2010
My Device: 9800
My Carrier: Airtel

How to open website in my application itself?

Hi All,

 

 

 

I am developing blackberry application which has default layout on each screen.

 

Default layout contains header and footer with some buttons.

 

I want to open the website from my blackberry application i.e. website should open in my application only.

 

If I use the following code -

 

 

BrowserSession browserSession = Browser.getDefaultSession();

 

browserSession.displayPage(www.google.com);

 

browserSession.showBrowser();

 

 

It opens the default browser in new window.

I don't want to open in new window. I want to open the website in myapplication itself or in my application window.

 

I hope you understand in my requirement.

Please help me.

 

Regards,

Bhavesh Patel

 

Developer
Posts: 950
Registered: ‎06-22-2010
My Device: 9550

Re: How to open website in my application itself?

Hello Bhavesh,

Either u use the BrowserSession or BrowserField,

U wanna open a webPage. so It Opens in the Browser.

So Whenever U open a Webpage then It will Open a Browser.

 

------------------------------------------------------------------------
Press Kudoes and Accept as solution Button, If u got Answer.

Thanks.

Regular Contributor
Posts: 75
Registered: ‎05-27-2010
My Device: 9800
My Carrier: Airtel

Re: How to open website in my application itself?

Can I open browser in my application screen?

 

The problem is - if browser opens in new window, then I will loose my application control.

I want to open the page/browser in the application itself.

 

Thanks.

Developer
Posts: 950
Registered: ‎06-22-2010
My Device: 9550

Re: How to open website in my application itself?

As Much  I Know, My answer is No.

 

And If there is way then U have to wait for Peter_Strange.

 

------------------------------------------------------------------------
Press Kudoes and Accept as solution Button, If u got Answer.

Thanks.

Regular Contributor
Posts: 75
Registered: ‎05-27-2010
My Device: 9800
My Carrier: Airtel

Re: How to open website in my application itself?

Can anybody help me?

 

Peter_Strange, waiting for your reply.

Developer
Posts: 31
Registered: ‎03-01-2010
My Device: 9300
My Carrier: O2

Re: How to open website in my application itself?

Will a BrowserField do what you want?

 

Check out the docs here (page 56)

 

http://docs.blackberry.com/en/developers/deliverables/11959/BlackBerry_Java_Application-Development_...

Regular Contributor
Posts: 75
Registered: ‎05-27-2010
My Device: 9800
My Carrier: Airtel

Re: How to open website in my application itself?

But BrowserField is available in 5.0, not in 4.2.1 or 4.6. Smiley Sad

Developer
Posts: 95
Registered: ‎01-25-2010
My Device: 9530

Re: How to open website in my application itself?

[ Edited ]

 

How to embed the browser within your application.

 

http://www.blackberry.com/DevMediaLibrary/view.do?name=HowtoembedtheBrowser

Developer
Posts: 31
Registered: ‎03-01-2010
My Device: 9300
My Carrier: O2

Re: How to open website in my application itself?

Ah, sorry didn't see you were on 4.x

 

Does the following help?

 

http://www.blackberry.com/DevMediaLibrary/view.do?name=HowtoembedtheBrowser