I'm successfully getting GsmCellLocation
and related cid and lac information but the PSC (primary scrambling code) of the serving cell is always coming back with the initialized value -1.
Anyone able to get the real PSC value of the serving cell?
telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
GsmCellLocation cellLocation = (GsmCellLocation) telephonyManager.getCellLocation();
psc = cellLocation.getPsc();
Log.d(TAG, "PSC = " + psc);
I have all the permissions necessary. My neighbor list returns empty as well but that's not a concern at the moment.
PSC is available only on UMTS network.
Check network type getNetworkType if it's
NETWORK_TYPE_UMTS
and notNETWORK_TYPE_EDGE