​Recently I discovered that Android N (7.0) provides a new method getArfcn() to get the Absolute Radio Frequency Channel Number, which gives you the exact frequency identifier that is used by the mobile phone on 2G (ARFCN), 3G (UARFCN) or 4G (EARFCN).

I found this very interesting to better know what’s behind the mobile network used, it is something I requested long time ago on the Android forums and I decided to update my version of Android Studio to test the new TelephonyManager API and see what else has been done by Google lately.

1. The good

The code has been extended to support collection of additional information, such as xARFCN on GSM, WCDMA and LTE. From this xARFCN it is now possible to determine the frequency used and the Band (although there are some cases in 2G and 3G where 2 Bands are possible for the same xARFCN).

The new API also reports:

  • Signal Level in 3 different forms with getLevel(), getAsuLevel(), getDbm().
  • BSIC or Base Station Identity Code for GSM with getBsic().
  • PSC or Primary Scrambling Code for WCDMA with getPsc().
  • PCI or Physical Cell Identifier for LTE with getPci().

2. The bad

Some methods are still hidden and cannot be accesses directly, although the information is present as we can see it in the “toString()” output of thel CellInfo method, for instance for LTE we can see the RSRP, RSRQ, RSSNR, CQI and TA:

[CellInfoLte:{mRegistered=YES mTimeStampType=oem_ril mTimeStamp=97874089095205ns CellIdentityLte:{ mMcc=456 mMnc=1 mCi=263682 mPci=379 mTac=10 mEarfcn=1700} CellSignalStrengthLte: ss=19 rsrp=-104 rsrq=-9 rssnr=2147483647 cqi=2147483647 ta=1}, CellInfoLte:{mRegistered=NO mTimeStampType=oem_ril mTimeStamp=97874089095205ns CellIdentityLte:{ mMcc=2147483647 mMnc=2147483647 mCi=2147483647 mPci=254 mTac=2147483647 mEarfcn=1700} CellSignalStrengthLte: ss=13 rsrp=-126 rsrq=-20 rssnr=2147483647 cqi=2147483647 ta=2147483647}, CellInfoLte:{mRegistered=NO mTimeStampType=oem_ril mTimeStamp=97874089095205ns CellIdentityLte:{ mMcc=2147483647 mMnc=2147483647 mCi=2147483647 mPci=252 mTac=2147483647 mEarfcn=1700} CellSignalStrengthLte: ss=13 rsrp=-126 rsrq=-20 rssnr=2147483647 cqi=2147483647 ta=2147483647}]

It is a pity that there is no get method to access those variables easily and the only way is either to parse the toString() returned value or to use Reflection to hack the code as explained here: http://www.programcreek.com/java-api-examples/index.php?api=android.telephony.CellInfo

Also, it is not clear whether it is possible to know when Carrier Aggregation is used and what are the specs of the second carrier used (I assume we will see the second carrier in the list of cells, possibly with mRegistered=YES but I could not find any information on this).

Last point, some people report that the data reported for signal strength is not correct, some say that the RSRP and RSRQ are mixed up. That may explain why there is no get method published, if this is still in beta version, that would be a bit dirty though to still show those values in the toString() result.

I hope to see more when testing this further.