Code example for Sensor

Methods: getType

0
	} 
	@Override 
	public void onSensorChanged(SensorEvent event) 
	{ 
		Sensor sensor = event.sensor;
		if (sensor.getType() == Sensor.TYPE_ACCELEROMETER)
		{ 
			accDataBrain.clear();
			accDataBrain.add(event.values[0]);
			accDataBrain.add(event.values[1]);
			accDataBrain.add(event.values[2]);
		} 
		 
	} 
	@Override 
	protected void onHandleIntent(Intent intent) 
	{ 
		while(true) 
		{ 
			// read accdata