package com.healthlife.util;

public class SensorController {

	public SensorController() {
		// TODO ԶɵĹ캯
	}
	
}

@@ -27,87 +27,1118 @@
 l;%0A%0A
-public class SensorController %7B%0A%0A%09public SensorController() %7B%0A%09%09// TODO %D4%B6%C9%B5%C4%B9%EC%BA%AF%0A%09%7D
+import android.content.Context;%0Aimport android.hardware.Sensor;%0Aimport android.hardware.SensorManager;%0A%0Apublic class SensorController %7B%0A%0A%09private SensorManager sensorManager;%0A%09private Sensor linearAcc,rotationVct,gyroscope;%0A%09%0A%09public void initSensors(int type,Context context) %7B%0A%09%09%0A%09%0A%09%09getSensorManager(context);%09%0A%09%09%0A%09%09//get specific sensors counting on the sportsmode%0A%09%09switch(type)%7B%0A%09%09%0A%09%09%09case 0 : %09linearAcc = sensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION); break;%0A%09%09%09%0A%09%09%09case 1 :    rotationVct = sensorManager.getDefaultSensor(Sensor.TYPE_GAME_ROTATION_VECTOR); break;%0A%09%09%09%0A%09%09%09case 2 :%09linearAcc = sensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION); %0A%09%09%09%09%09%09rotationVct = sensorManager.getDefaultSensor(Sensor.TYPE_GAME_ROTATION_VECTOR); %0A%09%09%09%09%09%09break;%0A%09%09%09%0A%09%09%09case 3 :%09linearAcc = sensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION); break;%0A%09%09%09%0A%09%09%09default: System.out.println(%22unknown mode%22); %0A%09%09%7D%0A%0A%09%7D%0A%0A%09public void record ()%0A%09%7B%0A%09%09%0A%09%7D%0A%09%0A%09private void getSensorManager(Context ctx)%7B%0A%09%09sensorManager = (SensorManager)ctx.getSystemService(Context .SENSOR_SERVICE);%0A%09%7D%0A%09
 %0A%09%0A%7D

add class sensor controller