Code example for SignalStrength

Methods: toString

0
			public void onDataConnectionStateChanged(int state){}
			public void onMessageWaitIndicatorChanged(boolean mwi){}
			public void onServiceStateChanged(ServiceState serviceState){}
			public void onSignalStrengthsChanged(SignalStrength signalStrength){
 
				String signalStrengthString = signalStrength.toString();
				String[] values = signalStrengthString.split(" ");
				 
//				if(getNetworkType() == "LTE"){ 
					LteSignalStrength = values[8];
					LteRsrp = values[9];
					LteRsrq = values[10];
					LteRssnr = values[11];
					LteCqi = values[12];
//				} 
//				else if(getNetworkType() == "EDGE" || getNetworkType() == "GPRS"){ 
					GsmRssi = -113 + 2 * Integer.parseInt(values[1]);
					GsmBitErrorRate = Integer.parseInt(values[2]);
//				} 
//				else{ 
					CdmaDbm = Integer.parseInt(values[3]);