Request a web page
- Import the net.rim.blackberry.api.browser.BrowserSession class.
- Invoke BrowserSession.displayPage(String url), specifying the URL that contains the web content.
The following sample creates a menu item that displays a web page in the BlackBerry® Browser.
private MenuItem browserItem =
new MenuItem(_resources.getString(MENUITEM_BROWSER), 110, 12)
{
public void run()
{
BrowserSession visit = Browser.getDefaultSession();
visit.displayPage("http://www.blackberry.com");
}
};
Previous topic: Retrieve a non-default BlackBerry Browser session