If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
New Contributor
said_sotelo
Posts: 7
Registered: ‎09-28-2010
My Device: Not Specified

Problem with Browser Field...HELP!!!

Hi everyone,

I am trying to use a Browser Field to show web content....I use this code that RIM hava as a sample:

 

 

package BrowserField;
import net.rim.device.api.browser.field2.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.container.*;
public class BrowserFieldDemo extends UiApplication
{
    public static void main(String[] args)
    {
        BrowserFieldDemo app = new BrowserFieldDemo();
        app.enterEventDispatcher();
    }
    public BrowserFieldDemo()
    {
        pushScreen(new BrowserFieldDemoScreen());
    }
}
class BrowserFieldDemoScreen extends MainScreen
{
    public BrowserFieldDemoScreen()
    {
        BrowserFieldConfig myBrowserFieldConfig = new BrowserFieldConfig();
        myBrowserFieldConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
        BrowserField browserField = new BrowserField(myBrowserFieldConfig);
        
        add(browserField);
        browserField.requestContent("http://wap.amovil.mx/ligas");
    }
}

 

 

I test this in the simulator and work perfectly but I test it in my Blackberry 8900 and failed because my smarthphone have a version 4.6 and If I am right the code that i post only work with devices that have versions 5.0 or later.

Someone can help me to use something like the browser field method to show web content but that works in devices with 4.5 or later? Or have another idea?

Thank you very much for your time.

 

 

Said Sotelo

 

Please use plain text.
Administrator
MSohm
Posts: 14,362
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Problem with Browser Field...HELP!!!

BrowserField2 is available in BlackBerry device software version 5.0 and higher.

 

For lower versions, refer to the browserfielddemo included with the BlackBerry Java SDK and BlackBerry JDE for an example on the use of the previous browser field.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.