在 BlackBerry 上启动 Web 浏览器
从黑莓应用程序中启动网络浏览器的最简单方法是:
Browser.getDefaultSession().displayPage(URL);
是否有任何原因我需要使用 Browser.getSession(UID)
而不是 Browser.getDefaultSession()
?如果我担心的只是显示所提供的 URL,那么对于打开默认会话不提供的 Web 浏览器的平均使用情况来说,这提供了什么?
The simplest way to launch a web browser from within a blackberry app is:
Browser.getDefaultSession().displayPage(URL);
Is there any reason I would need to use Browser.getSession(UID)
instead of Browser.getDefaultSession()
? What does that provide for the average use of opening a web browser that the default session does not, if all I'm worried about is showing the URL provided?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
getDefaultSession() 返回默认浏览器的会话,getSession(UID) 获取 UID 指定的连接的会话,该 UID 可能是:BES、BIS_B、WAP 等。
以下链接提供了大量有关网络传输和浏览器会话:
http://supportforums.blackberry.com/ t5/Java-Development/Network-Transports/ta-p/446834
http://supportforums.blackberry.com/t5/Java-Development/Networking-Transports-II/ta-p/446742
http://www.blackberry.com/ knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800440/How_To_-_Invoke_the_browser.html?nodeid=1487366&vernum=0
getDefaultSession() returns the session for the default browser, getSession(UID) gets the session for the connection specified by the UID which might be: BES, BIS_B, WAP, etc.
The following links provide a great deal of information on network trasports and browser sessions:
http://supportforums.blackberry.com/t5/Java-Development/Network-Transports/ta-p/446834
http://supportforums.blackberry.com/t5/Java-Development/Networking-Transports-II/ta-p/446742
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800440/How_To_-_Invoke_the_browser.html?nodeid=1487366&vernum=0