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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 4
Registered: ‎11-07-2011
My Device: Torch
My Carrier: Wut

Browser Object

[ Edited ]

 Hi everyone,

I'm trying to display a simple webpage, but all the time i'm getting an 120000 timeout..
Probably because i'm doing something wrong..

Also I will be trying to navigate to the project files located in [Projectname] > src > www > index.html

But on the internet there is nothing found about this or any simple tutorial about this..

 

The code I'm using:

BrowserFieldConfig _config = new BrowserFieldConfig();
BrowserField _bf = new BrowserField(_config);
MainScreen _screen = new MainScreen();
_bf.requestContent("http://www.google.com/");
_screen.add(_bf);
pushScreen(_screen);

 
Anyone who could help me with this??

The navigation is to a pre-defined webpage, so there has not to be an addressbar to be shown.

Yours Sincerley,
Lars

Developer
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Browser Object

Hi Lars,

 

Is your MDS on?

 

E.

Developer
Posts: 179
Registered: ‎06-15-2011
My Device: Storm 9550
My Carrier: Vodaphone

Re: Browser Object

Open the default browser of device and try same url.

New Contributor
Posts: 4
Registered: ‎11-07-2011
My Device: Torch
My Carrier: Wut

Re: Browser Object

[ Edited ]

maadani
Hmm, what's an MDS?

 


The url works, but i just dont want the address bar to be shown..

It works with the following code.. but it still displays the addressbar..

 

BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage("http://www.google.com/");
browserSession.showBrowser();

 

Developer
Posts: 179
Registered: ‎06-15-2011
My Device: Storm 9550
My Carrier: Vodaphone

Re: Browser Object

I use the followinf code: inside MainScreen.

 

BrowserFieldConfig  helpConfig = new BrowserFieldConfig();

helpConfig.setProperty(BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE);

helpField = new BrowserField(helpConfig);
 helpField.requestContent("local:///abc.html");
VerticalFieldManager helpVFM = new VerticalFieldManager(VERTICAL_SCROLL);
helpVFM.add(helpField);
 add(helpVFM);

Highlighted
New Contributor
Posts: 4
Registered: ‎11-07-2011
My Device: Torch
My Carrier: Wut

Re: Browser Object

[ Edited ]

Aaah, that helped indeed.

However, this browsing type is not functional when using an external website i.e. google.com.
When using the local PhoneCap files, it does load, but the JS functionalities are not responsive..

Any thoughts?