当连接ConnectionFactory在模拟器上工作并且无法在真实设备上工作时Torch 9800在Curve 9300上工作我运行网络诊断工具两者都显示成功测试曲线上有wifi但在火炬上所有测试失败,奇怪的是浏览器工作但应用程序和网络诊断工具都失败了。有人能给我一些线索吗?
添加了代码:
ConnectionFactory cf = new ConnectionFactory();
cf.setPreferredTransportTypes(new int[]{
TransportInfo.TRANSPORT_TCP_WIFI,
TransportInfo.TRANSPORT_TCP_CELLULAR,
TransportInfo.TRANSPORT_WAP,
TransportInfo.TRANSPORT_WAP2,
TransportInfo.TRANSPORT_MDS,
TransportInfo.TRANSPORT_BIS_B
});
ConnectionDescriptor cd = cf.getConnection(s);
if (cd!=null){
connection = (HttpConnection) cd.getConnection();
}else {
String appendix = getBlackBerryConnectionParams();
System.out.println("Strng: "+appendix);
connection = (HttpConnection) Connector.open(s+appendix);
}