如何从 BlackBerry 打开 URL?
在 J2ME 中我使用:
this.platformRequest("http://www.google.com");
我怎样才能在黑莓上做到这一点?
最佳答案
如果要启动浏览器 session ,可以使用:
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();
您确实需要确保处理连接和返回的数据不会在事件线程上发生,否则您的黑莓手机将挂起。
关于browser - 黑莓推出原生网络浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/614526/