本文整理匯總了Java中net.rim.device.api.system.RadioInfo.STATE_ON屬性的典型用法代碼示例。如果您正苦於以下問題:Java RadioInfo.STATE_ON屬性的具體用法?Java RadioInfo.STATE_ON怎麽用?Java RadioInfo.STATE_ON使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類net.rim.device.api.system.RadioInfo
的用法示例。
在下文中一共展示了RadioInfo.STATE_ON屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getBestTransportForActiveCoverage
public int getBestTransportForActiveCoverage() {
int availableTransports = getAvailableTransportCoverage();
int iCurTransport = -1;
if ((availableTransports & TransportDetective.TRANSPORT_TCP_WIFI) > 0) {
iCurTransport = TransportDetective.TRANSPORT_TCP_WIFI;
} else if (RadioInfo.getState() == RadioInfo.STATE_ON
&& RadioInfo.getSignalLevel() != RadioInfo.LEVEL_NO_COVERAGE) {
if ((availableTransports & TransportDetective.TRANSPORT_MDS) > 0) {
iCurTransport = TransportDetective.TRANSPORT_MDS;
} else if ((availableTransports & TransportDetective.TRANSPORT_BIS_B) > 0) {
iCurTransport = TransportDetective.TRANSPORT_BIS_B;
}
if (iCurTransport == -1 && ((availableTransports & TransportDetective.TCP_CELLULAR_APN_SERVICE_BOOK) > 0)) {
iCurTransport = TransportDetective.TCP_CELLULAR_APN_SERVICE_BOOK;
} else if (iCurTransport == -1 && ((availableTransports & TransportDetective.TRANSPORT_TCP_CELLULAR) > 0)) {
iCurTransport = TransportDetective.TRANSPORT_TCP_CELLULAR;
}
}
return iCurTransport;
}