检测Android手机支持的工作频率/频段

时间:2014-02-27 12:20:07

标签: android networking gsm 3g-network 4g

是否可以检测Android设备支持的频率/频段。我只想检测该设备是否支持3G / 4G网络。

我已使用连接管理器和网络信息打印出详细的网络信息。

02-27 15:14:11.122: D/3G4G(20923): Type : 0
02-27 15:14:11.122: D/3G4G(20923): Type Name : mobile
02-27 15:14:11.122: D/3G4G(20923): Sub Type :0
02-27 15:14:11.122: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.122: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.122: D/3G4G(20923): Extra Info : null
02-27 15:14:11.122: D/3G4G(20923): ______________________
02-27 15:14:11.122: D/3G4G(20923): Type : 1
02-27 15:14:11.122: D/3G4G(20923): Type Name : WIFI
02-27 15:14:11.122: D/3G4G(20923): Sub Type :0
02-27 15:14:11.122: D/3G4G(20923): SubType Name : 
02-27 15:14:11.122: D/3G4G(20923): SubType Name : 
02-27 15:14:11.122: D/3G4G(20923): Extra Info : "Mac Abdul"
02-27 15:14:11.122: D/3G4G(20923): ______________________
02-27 15:14:11.122: D/3G4G(20923): Type : 2
02-27 15:14:11.122: D/3G4G(20923): Type Name : mobile_mms
02-27 15:14:11.122: D/3G4G(20923): Sub Type :0
02-27 15:14:11.122: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.122: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.122: D/3G4G(20923): Extra Info : null
02-27 15:14:11.122: D/3G4G(20923): ______________________
02-27 15:14:11.122: D/3G4G(20923): Type : 3
02-27 15:14:11.122: D/3G4G(20923): Type Name : mobile_supl
02-27 15:14:11.122: D/3G4G(20923): Sub Type :0
02-27 15:14:11.122: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.122: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.122: D/3G4G(20923): Extra Info : null
02-27 15:14:11.122: D/3G4G(20923): ______________________
02-27 15:14:11.122: D/3G4G(20923): Type : 4
02-27 15:14:11.122: D/3G4G(20923): Type Name : mobile_dun
02-27 15:14:11.122: D/3G4G(20923): Sub Type :0
02-27 15:14:11.122: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.122: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.122: D/3G4G(20923): Extra Info : null
02-27 15:14:11.122: D/3G4G(20923): ______________________
02-27 15:14:11.122: D/3G4G(20923): Type : 5
02-27 15:14:11.122: D/3G4G(20923): Type Name : mobile_hipri
02-27 15:14:11.122: D/3G4G(20923): Sub Type :0
02-27 15:14:11.122: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.122: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.122: D/3G4G(20923): Extra Info : null
02-27 15:14:11.122: D/3G4G(20923): ______________________
02-27 15:14:11.122: D/3G4G(20923): Type : 7
02-27 15:14:11.122: D/3G4G(20923): Type Name : BLUETOOTH_TETHER
02-27 15:14:11.122: D/3G4G(20923): Sub Type :0
02-27 15:14:11.122: D/3G4G(20923): SubType Name : 
02-27 15:14:11.122: D/3G4G(20923): SubType Name : 
02-27 15:14:11.122: D/3G4G(20923): Extra Info : null
02-27 15:14:11.122: D/3G4G(20923): ______________________
02-27 15:14:11.122: D/3G4G(20923): Type : 10
02-27 15:14:11.122: D/3G4G(20923): Type Name : mobile_fota
02-27 15:14:11.122: D/3G4G(20923): Sub Type :0
02-27 15:14:11.122: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.122: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.132: D/3G4G(20923): Extra Info : null
02-27 15:14:11.132: D/3G4G(20923): ______________________
02-27 15:14:11.132: D/3G4G(20923): Type : 11
02-27 15:14:11.132: D/3G4G(20923): Type Name : mobile_ims
02-27 15:14:11.132: D/3G4G(20923): Sub Type :0
02-27 15:14:11.132: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.132: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.132: D/3G4G(20923): Extra Info : null
02-27 15:14:11.132: D/3G4G(20923): ______________________
02-27 15:14:11.132: D/3G4G(20923): Type : 12
02-27 15:14:11.132: D/3G4G(20923): Type Name : mobile_cbs
02-27 15:14:11.132: D/3G4G(20923): Sub Type :0
02-27 15:14:11.132: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.132: D/3G4G(20923): SubType Name : UNKNOWN
02-27 15:14:11.132: D/3G4G(20923): Extra Info : null

“mobile_hipri”是否意味着设备支持3G网络?我怎样才能检测到该设备是否支持4G网络。

编辑: 我使用以下代码打印出此信息

ConnectivityManager cm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
       NetworkInfo[] info = cm.getAllNetworkInfo();
       for(int i=0; i <info.length-1; i++){
           Log.d("3G4G", "Type : " + info[i].getType()+"");
           Log.d("3G4G", "Type Name : " + info[i].getTypeName());
           Log.d("3G4G", "Sub Type :" +info[i].getSubtype()+"");
           Log.d("3G4G", "SubType Name : " + info[i].getSubtypeName());
           Log.d("3G4G", "SubType Name : " + info[i].getSubtypeName());
           Log.d("3G4G", "Extra Info : " + info[i].getExtraInfo());
           Log.d("3G4G","______________________");
       }

我需要知道工作频率(GSM 850/900/1800/1900或任何其他)设备支持。如果有任何其他方式可以找到该设备支持3G / 4G网络,请告知。

0 个答案:

没有答案