I am not able to find any download links for the NDT. I want to analyze the ReportScreen.displayNetworkInfo() method.
Asked
Active
Viewed 492 times
0
-
Do you want someone to point out download links, or explain the method? – the Tin Man Aug 14 '12 at 06:42
1 Answers
3
I think you just missed it. The link is on that page, but the hyperlink text is only one little word ("here"), which might not stand out, depending on your browser.
Here's the full link to the source code:
I checked, and the ReportScreen.java file is there:
/**
* Displays various network/radio info
*/
public void displayNetworkInfo(){
if(RadioInfo.getSignalLevel(RadioInfo.WAF_3GPP)!=RadioInfo.LEVEL_NO_COVERAGE){
add(new EditField("3GPP Signal Level: ",RadioInfo.getSignalLevel(RadioInfo.WAF_3GPP)+"dBm",255,EditField.READONLY));
add(new SeparatorField());
}
if(RadioInfo.getSignalLevel(RadioInfo.WAF_CDMA)!=RadioInfo.LEVEL_NO_COVERAGE){
add(new EditField("CDMA Signal Level: ",RadioInfo.getSignalLevel(RadioInfo.WAF_CDMA)+"dBm",255,EditField.READONLY));
add(new SeparatorField());
}
if(RadioInfo.getSignalLevel(RadioInfo.WAF_IDEN)!=RadioInfo.LEVEL_NO_COVERAGE){
add(new EditField("iDEN Signal Level: ",RadioInfo.getSignalLevel(RadioInfo.WAF_IDEN)+"dBm",255,EditField.READONLY));
add(new SeparatorField());
}
if(RadioInfo.getSignalLevel(RadioInfo.WAF_WLAN)!=RadioInfo.LEVEL_NO_COVERAGE){
add(new EditField("WLAN Signal Level: ",RadioInfo.getSignalLevel(RadioInfo.WAF_WLAN)+"dBm",255,EditField.READONLY));
add(new SeparatorField());
}
add(new EditField("Network: ",RadioInfo.getCurrentNetworkName(),255,EditField.READONLY));
add(new SeparatorField());
String netType="";
switch(RadioInfo.getNetworkType()){
case RadioInfo.NETWORK_CDMA:
netType="CDMA";
break;
case RadioInfo.NETWORK_GPRS:
netType="GPRS";
break;
case RadioInfo.NETWORK_IDEN:
netType="IDEN";
break;
case RadioInfo.NETWORK_NONE:
netType="NONE";
break;
case RadioInfo.NETWORK_UMTS:
netType="UMTS";
break;
case RadioInfo.NETWORK_802_11:
netType="802.11";
break;
default:
netType="Failed to determine";
}
add(new EditField("Network Type: ",netType,255,EditField.READONLY));
add(new SeparatorField());
int activeWAFS = RadioInfo.getNetworkService();
String services = "";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_DATA)>0)
services+="Data + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_DIRECT_CONNECT)>0)
services+="Direct Connect + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_E911_CALLBACK_MODE)>0)
services+="E911 Callback + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_EDGE)>0)
services+="EDGE + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_EMERGENCY_ONLY)>0)
services+="Emergency Only + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_EVDO)>0 && RadioInfo.getNetworkType()==RadioInfo.NETWORK_CDMA)
services+="EVDO + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_EVDO_ONLY)>0)
services+="EVDO Only + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_GAN)>0)
services+="GAN + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_IN_CITY_ZONE)>0)
services+="City Zone + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_IN_HOME_ZONE)>0)
services+="Home Zone + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_MODEM_MODE_ENABLED)>0)
services+="Modem Mode + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_ROAMING)>0)
services+="Roaming + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_ROAMING_OFF_CAMPUS)>0)
services+="Roaming Off-campus + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_SUPPRESS_ROAMING)>0)
services+="Supress Roaming + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_UMTS)>0)
services+="UMTS + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_VOICE)>0)
services+="Voice + ";
if(services.length()>2){
add(new EditField("Network Services: ",services.substring(0,services.length()-2),255,EditField.READONLY));
add(new SeparatorField());
} else{
add(new EditField("Network Services: ","No Service Found",255,EditField.READONLY));
add(new SeparatorField());
}
add(new EditField("PIN: ",Integer.toHexString(DeviceInfo.getDeviceId())+"",255,EditField.READONLY));
add(new SeparatorField());
add(new EditField("Battery: ",DeviceInfo.getBatteryLevel()+"%",255,EditField.READONLY));
add(new SeparatorField());
add(new SeparatorField());
}

Nate
- 31,017
- 13
- 83
- 207