Code example for Sensor

Methods: getType

	public void onSensorChanged(SensorEvent event) {
		Sensor sensor = event.sensor;
		int type = sensor.getType();
		long time = System.currentTimeMillis();
		mEventQueue.put(new Event(time, type, event.values));
	public void run() { 
		LogUtils.d("EventQueue running..."); 
		try { 
			Socket socket = new Socket(getServerIpAddress(), getServerPort());
			PrintWriter out = new PrintWriter(socket.getOutputStream(), true);
			while (mIsRunning) {
				Event event = mEventQueue.take();
Connect your IDE to all the code out there  Get Codota for Java