Moved CompassListener into CompassSensor.java

Change-Id: Id6b1453eff3671b1d59d075c4da8ada6827e2bdd
Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
2012-03-14 11:11:37 -04:00
parent f2940419bb
commit eaf205c865
7 changed files with 19 additions and 26 deletions

View File

@@ -28,13 +28,27 @@ import com.TwentyCodes.android.debug.Debug;
*/
public class CompassSensor{
/**
* A simple listener interface to get updates from CompassSensor
* @author ricky barrette
*/
public interface CompassListener {
/**
* Called when there is an update from the Compass Sensor
* @param bearing
* @author ricky barrette
*/
public void onCompassUpdate(float bearing);
}
public static final String TAG = "CompassSensor";
private static final int BEARING = 0;
private final Display mDisplay;
private final Handler mHandler;
private final SensorManager mSensorManager;
private final Context mContext;
private CompassListener mListener;
private Context mContext;
private float mDelination = 0;
private final SensorEventListener mCallBack = new SensorEventListener() {