【问题标题】:Blackberry - HttpConnection using EDGE net黑莓 - 使用 EDGE 网络的 HttpConnection
【发布时间】:2012-04-23 17:41:47
【问题描述】:

我想为一个黑莓应用程序做一个 httpconnection。我使用类似的网址

http://ip:port/prueba.php;deviceside=true

如果我想通过wifi将它使用到设备中,我添加interface=wifi。

但我不知道为什么它不能通过 EDGE 连接。我还能做些什么吗?我听说你已经签署了你的申请,但我不明白。

【问题讨论】:

    标签: blackberry httpconnection cellular-network


    【解决方案1】:

    使用:";deviceside=true;ConnectionUID="+ srTCP.getUid()

     private ServiceRecord srTCP;
     private void init() 
        {
    
            ServiceBook sb = ServiceBook.getSB();
            ServiceRecord[] records = sb.getRecords();
    
            for (int i = 0; i < records.length; i++)
            {
                ServiceRecord myRecord = records[i];
                String cid, uid;
    
                if (myRecord.isValid() && !myRecord.isDisabled()) 
                {
                    cid = myRecord.getCid().toLowerCase();
                    uid = myRecord.getUid().toLowerCase();
                    if (cid.indexOf(WPTCP_STR) != -1 && uid.indexOf(WIFI_STR) == -1 && uid.indexOf(MMS_STR) == -1) 
                    {
                        String httpProxyAddress = getDataString(myRecord, BYTE_PROXY_ADDRESS);
                        if ((httpProxyAddress == null) || StringUtils.isBlank(httpProxyAddress.trim())) 
                        {
                            srTCP = myRecord;
                        } 
                    }
                }
          }
      }
    

    【讨论】:

      猜你喜欢
      • 2012-01-27
      • 2011-09-04
      • 2011-01-24
      • 2012-02-18
      • 1970-01-01
      • 2013-02-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多