Initial commit of the passive location listener

Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
2012-05-15 10:39:00 -04:00
parent 5ba3f55eda
commit ff27eb8ae3
10 changed files with 147 additions and 44 deletions

View File

@@ -21,6 +21,7 @@ import android.view.Surface;
import android.view.WindowManager;
import com.TwentyCodes.android.debug.Debug;
import com.TwentyCodes.android.debug.LocationLibraryConstants;
/**
* A simple convince class that accesses the compass sensor on another thread
@@ -206,9 +207,9 @@ public class CompassSensor{
@Override
public void run() {
// Register this class as a listener for the accelerometer sensor
mSensorManager.registerListener(mCallBack, mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), Debug.COMPASS_UPDATE_INTERVAL);
mSensorManager.registerListener(mCallBack, mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), LocationLibraryConstants.COMPASS_UPDATE_INTERVAL);
// ...and the orientation sensor
mSensorManager.registerListener(mCallBack, mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), Debug.COMPASS_UPDATE_INTERVAL);
mSensorManager.registerListener(mCallBack, mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), LocationLibraryConstants.COMPASS_UPDATE_INTERVAL);
}
}).start();
}