Code example for SocketException

Methods: getMessage

0
		lastPitch = 0;
 
		try { 
			sock = new DatagramSocket();
		} catch (SocketException e) {
			Log.e(TAG, "Error opening socket: " + e.getMessage());
		} 
 
	} 
 
	/** 
	 * Sets the sensitivity of the GestureLogger The sensitivity is inverted, so 
	 * for example: 1 would leave the the fluctuation at +/- 1 degrees 2 would 
	 * become 0.5 and change the fluctuation to +/- 0.5 degrees 0.5 would become 
	 * 2 and change the fluctuation to +/- 2 degrees 0.25 would become 4 and 
	 * change the fluctuation to +/- 4 degrees 
	 */ 
	public void setSensitivity(double sensitivity) {
		this.sensitivity = 1 / sensitivity;
	} 
Connect your IDE to all the code out there  Get Codota for Java