我正在创建httpConnection,但当运行应用程序时,它会出现以下异常?
是否未指定java.io.IOException APN?
发布于 2011-04-11 20:22:43
我认为请参阅开发人员知识库文章:链接可以解决您的问题http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is_-_Different_ways_to_make_an_HTTP_or_socket_connection.html?nodeid=826935&vernum=0
另请参阅此示例代码
private static String getConnectionString(){
String connectionString="";
if(WLANInfo.getWLANState()==WLANInfo.WLAN_STATE_CONNECTED){
connectionString="?;interface=wifi";
}
else if((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_MDS) == CoverageInfo.COVERAGE_MDS){
connectionString = "?;&deviceside=false";
}
else if((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_DIRECT)==CoverageInfo.COVERAGE_DIRECT){
String carrierUid=getCarrierBIBSUid();
if(carrierUid == null) {
connectionString = "?;deviceside=true";
}
else{
connectionString = "?;deviceside=false?;connectionUID="+carrierUid + "?;ConnectionType=mds-public";
}
}
else if(CoverageInfo.getCoverageStatus() == CoverageInfo.COVERAGE_NONE) {
}
return connectionString;
}发布于 2014-05-06 23:22:35
更重要的是,
http://supportforums.blackberry.com/t5/Java-Development/How-to-get-APN-Settings/td-p/1704995
这是不完全可能把APN设置在您的网址,例如。没有办法获得用户名和密码。
https://stackoverflow.com/questions/5620594
复制相似问题