Code example for SignalStrength

Methods: getGsmSignalStrength

0
		tm.listen(new GSMListener(), PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);
	} 
	 
	class GSMListener extends PhoneStateListener {
		public void onSignalStrengthsChanged(SignalStrength ss) {
			gsmSS = ss.getGsmSignalStrength();
			if(gsmSS > 32)
				gsmSS = Double.NaN;
		} 
	} 
 
	protected void publishGSM(Publisher p) throws Exception {
		 
		if(tm != null) {
			String deviceId = tm.getDeviceId();
			if(deviceId != null)
				p.publish(process, "gsm_imei",
						deviceId, GMetricType.STRING, GMetricSlope.BOTH, "");
			 
			p.publish(process, "gsm_signal_strength",
Stop searching for code, let great code find you!  Add Codota to your java IDE