黑莓连接在模拟器上工作,而不是在设备上
以下代码在模拟器上运行良好,但是当我将其部署到 BlackBerry 设备时,我无法连接,我是否做错了什么?
URL = "socket://" + server + ":" + port + ";deviceside=true;apn=internet;tunnelauthusername=;tunnelauthpassword=";
conn = (StreamConnection) Connector.open(URL);
The following code works fine on the simulator, but when I deploy it to the BlackBerry device I'm not able to connect, am I doing something wrong?
URL = "socket://" + server + ":" + port + ";deviceside=true;apn=internet;tunnelauthusername=;tunnelauthpassword=";
conn = (StreamConnection) Connector.open(URL);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 OS5+ 上使用此功能: http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/io/transport/package-summary.html
如果较旧的话:http://www.versatilemonkey.com/HttpConnectionFactory.java
Use this on OS5+ : http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/io/transport/package-summary.html
And this if older : http://www.versatilemonkey.com/HttpConnectionFactory.java