0

Is it possible to detect frequency/band supported by android device. I just want to detect that device support 3G/4G network or not.

I have printed out the detail network info using connectivity manager and Network info.

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

Does "mobile_hipri" it means device support 3G network? how can i detect that device support 4G network or not.

Edit : I have used the following code for printing out this information

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","______________________");
       }

I need to know Operating frequencies(GSM 850 / 900 / 1800 / 1900 or any other) device supports. If there is any other way for finding that device support 3G/4G network, then please tell.

manlio
  • 18,345
  • 14
  • 76
  • 126
Basit ZIa
  • 966
  • 1
  • 9
  • 26
  • Do you want to get this information programmatically? – user1725145 Feb 27 '14 at 15:53
  • Yes off course programmatically. Is there any code? which i can dial to get information. – Basit ZIa Feb 27 '14 at 18:34
  • It's not obvious from your question. "connectivity manager" could refer to anything. I am guessing you are talking about the android.net ConnectivityManager class, and the getAllNetworkInfo() method. Also, your title has a different question from the question at the end - are you trying to get the Radio Access Technology type (3G, 4G etc) or the operating band? Or do you just want to know if the device supports the mobile network at all? Can you please edit the question and make it clearer? I don't want to post suggestions that may not be what you're looking for. – user1725145 Feb 28 '14 at 10:27
  • @SList i just want to get that device support 3G/4G network or not. I thought if i can get frequency bands then i can check that device support 3G/4G network or not, if there is any other way please tell. – Basit ZIa Feb 28 '14 at 13:08
  • Hipri just means the high priority network, i.e. the one that Android is using. Normally, the information that you seek should be in the Subtype field (TelephonyManager network_type_xxxx value). What happens if you set mobile_hipri to a technology that isn't supported (e.g. 4G if the device only supports 3G)? Can you deduce the supported technologies from that? – user1725145 Feb 28 '14 at 13:50
  • In this duplicate question: http://stackoverflow.com/questions/7887840/how-to-check-whether-a-particular-device-supports-4g-networks-in-android you can see that the answer recommends using the Subtype field. Not sure why your result give 0 in this field. – user1725145 Feb 28 '14 at 13:54
  • @SList I got your point, Just confirm me one more thing. If i set mobile_hipri to 4G (Device support 4G but available telecom network does not), will the mobile_hipri be set to 4G or not ? – Basit ZIa Feb 28 '14 at 15:08
  • I don't know, but I am guessing Yes. Basically, it can either set 4G preferred, or 4G only. Probably it sets 4G preferred, because that's more flexible. The documentation doesn't say much, so probably you have to test it. – user1725145 Feb 28 '14 at 15:13
  • i believe what you are looking for has been answered here: http://stackoverflow.com/questions/9283765/how-to-determine-if-network-type-is-2g-3g-or-4g?rq=1 – Akah Dec 24 '15 at 11:53

0 Answers0