public class GGComboSensor
extends java.lang.Object
| Modifier and Type | Method and Description | 
|---|---|
void | 
addComboSensorListener(GGComboSensorListener listener)
Registers a GGComboSensorListener to get notifications when
 the sensor reports new values. 
 | 
float[] | 
getAcceleration(int precision)
Returns the current acceleration components. 
 | 
float[] | 
getMagneticField(int precision)
Returns the current magnetic field components. 
 | 
float[] | 
getOrientation(int precision)
Returns the current orientation angles (azimuth, pitch, roll). 
 | 
static GGComboSensor | 
init(android.app.Activity activity)
Initializes the combo sensor for the given activity and 
 returns a GGComboSensor reference for the given activity. 
 | 
static GGComboSensor | 
init(android.app.Activity activity,
    int sensorDelay)
Initializes the orientation sensor for the given activity and 
 returns a GGComboSensor reference for the given activity. 
 | 
public static GGComboSensor init(android.app.Activity activity)
public static GGComboSensor init(android.app.Activity activity, int sensorDelay)
activity - the activity used to access the systemsensorDelay - one of the SENSOR_DELAY constants in class SensorManagerpublic float[] getOrientation(int precision)
precision - the number of fractional digits to report
 to eliminate sensor jitter (0..5).public float[] getAcceleration(int precision)
precision - the number of fractional digits to report
 to eliminate sensor jitter (0..5).public float[] getMagneticField(int precision)
precision - the number of fractional digits to report
 to eliminate sensor jitter (0..5).public void addComboSensorListener(GGComboSensorListener listener)
listener - the GGComboSensorListener to register