Code example for ServiceState

Methods: getOperatorAlphaLonggetState

1
	static class PhoneState extends PhoneStateListener {
		public int state = 0;
		public int strength = 0;
		 
		public void onServiceStateChanged(ServiceState serviceState){
			Log.d(TAG, "Service State changed to: " + serviceState.getState() + " -- " + serviceState.getOperatorAlphaLong());
			state = serviceState.getState();
		} 
		 
		public void	onSignalStrengthsChanged(SignalStrength signalStrength){
			//Log.d(TAG, "Signal strength changed to: " + signalStrength.getGsmSignalStrength()); 
			strength = signalStrength.getGsmSignalStrength();
		} 
	} 
}