Code example for GsmCellLocation

Methods: getCid, getLac, getPsc

0
 
		// Peut être CDMA ou GSM on aurait pus utiliser tm.getPhoneType() 
		if (cellLocation instanceof GsmCellLocation) {
			GsmCellLocation cellLoc = (GsmCellLocation) cellLocation;
 
			msg += "Cell ID :" + cellLoc.getCid() + LR;
			msg += "Cell area code :" + cellLoc.getLac() + LR;
			msg += "Scrambling cell code :" + cellLoc.getPsc() + LR;
 
		} else if (cellLocation instanceof CdmaCellLocation) {
 
			CdmaCellLocation cellLoc = (CdmaCellLocation) cellLocation;
 
			msg += "Base station id :" + cellLoc.getBaseStationId() + LR;
			msg += "Base station lat :" + cellLoc.getBaseStationLatitude() + LR;
			msg += "Base station long :" + cellLoc.getBaseStationLongitude()
					+ LR;
			msg += "Network id :" + cellLoc.getNetworkId() + LR;
			msg += "System id :" + cellLoc.getSystemId() + LR;
 
		}