How can i open a url from BlackBerry? in j2me i'm use: this.platformRequest("http://www.google.com");
How can i do on BB?
Thk!!!
How can i open a url from BlackBerry? in j2me i'm use: this.platformRequest("http://www.google.com");
How can i do on BB?
Thk!!!
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);