Code example for Sensor

Methods: getType

0
 
	} 
 
	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();
Stop searching for code, let great code find you!  Add Codota to your java IDE