使用: ";真deviceside =; = 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-04-24 05:59:09
RVG