How can I open a URL from BlackBerry ? in J2ME I am using:
this.platformRequest("http://www.google.com");
How can I do this on BlackBerry?
How can I open a URL from BlackBerry ? in J2ME I am using:
this.platformRequest("http://www.google.com");
How can I do this on BlackBerry?
If you want to launch a browser session you would use:
Browser.getDefaultSession().displayPage("http://www.google.com");
If you want to open, and then read the returned data for processing yourself:
HttpConnection google = (HttpConnection)javax.microedition.io.Connector.open("http://www.google.com");
int rc = google.getResponceCode();
...
InputStream is = google.openInputStream();
You do need to make sure that processing the connection and returned data does not happen on the event thread or your blackberry will hang.
Browser.getDefaultSession().displayPage("http://www.google.com");
is the correct way to launch the BlackBerry browser with your URL.
well i think kozen is right but u can go ahead like this,may be......
BrowserSession bSession = Browser.getDefaultSession();
bSession.displayPage(url);
BrowserSession myBrowser = Browser.getDefaultSession();
myBrowser.displayPage("http://www.stackoverflow.com");
or
Browser.getDefaultSession().displayPage("http://www.stackoverflow.com");