android.hardware
Class SensorManager

java.lang.Object
  extended by android.hardware.SensorManager

public class SensorManager
extends Object


Field Summary
static int AXIS_MINUS_X
           
static int AXIS_MINUS_Y
           
static int AXIS_MINUS_Z
           
static int AXIS_X
           
static int AXIS_Y
           
static int AXIS_Z
           
static int DATA_X
           
static int DATA_Y
           
static int DATA_Z
           
static float GRAVITY_DEATH_STAR_I
           
static float GRAVITY_EARTH
           
static float GRAVITY_JUPITER
           
static float GRAVITY_MARS
           
static float GRAVITY_MERCURY
           
static float GRAVITY_MOON
           
static float GRAVITY_NEPTUNE
           
static float GRAVITY_PLUTO
           
static float GRAVITY_SATURN
           
static float GRAVITY_SUN
           
static float GRAVITY_THE_ISLAND
           
static float GRAVITY_URANUS
           
static float GRAVITY_VENUS
           
static float LIGHT_CLOUDY
           
static float LIGHT_FULLMOON
           
static float LIGHT_NO_MOON
           
static float LIGHT_OVERCAST
           
static float LIGHT_SHADE
           
static float LIGHT_SUNLIGHT
           
static float LIGHT_SUNLIGHT_MAX
           
static float LIGHT_SUNRISE
           
static float MAGNETIC_FIELD_EARTH_MAX
           
static float MAGNETIC_FIELD_EARTH_MIN
           
static float PRESSURE_STANDARD_ATMOSPHERE
           
static int RAW_DATA_INDEX
           
static int RAW_DATA_X
           
static int RAW_DATA_Y
           
static int RAW_DATA_Z
           
static int SENSOR_ACCELEROMETER
           
static int SENSOR_ALL
           
static int SENSOR_DELAY_FASTEST
           
static int SENSOR_DELAY_GAME
           
static int SENSOR_DELAY_NORMAL
           
static int SENSOR_DELAY_UI
           
static int SENSOR_LIGHT
           
static int SENSOR_MAGNETIC_FIELD
           
static int SENSOR_MAX
           
static int SENSOR_MIN
           
static int SENSOR_ORIENTATION
           
static int SENSOR_ORIENTATION_RAW
           
static int SENSOR_PROXIMITY
           
static int SENSOR_STATUS_ACCURACY_HIGH
           
static int SENSOR_STATUS_ACCURACY_LOW
           
static int SENSOR_STATUS_ACCURACY_MEDIUM
           
static int SENSOR_STATUS_UNRELIABLE
           
static int SENSOR_TEMPERATURE
           
static int SENSOR_TRICORDER
           
static float STANDARD_GRAVITY
           
 
Method Summary
static float getAltitude(float p0, float p)
           
static void getAngleChange(float[] angleChange, float[] R, float[] prevR)
           
 Sensor getDefaultSensor(int type)
           
static float getInclination(float[] I)
           
static float[] getOrientation(float[] R, float[] values)
           
static void getQuaternionFromVector(float[] Q, float[] rv)
           
static boolean getRotationMatrix(float[] R, float[] I, float[] gravity, float[] geomagnetic)
           
static void getRotationMatrixFromVector(float[] R, float[] rotationVector)
           
 List<Sensor> getSensorList(int type)
           
 int getSensors()
           
 boolean registerListener(SensorEventListener listener, Sensor sensor, int rate)
           
 boolean registerListener(SensorEventListener listener, Sensor sensor, int rate, Handler handler)
           
 boolean registerListener(SensorListener listener, int sensors)
           
 boolean registerListener(SensorListener listener, int sensors, int rate)
           
static boolean remapCoordinateSystem(float[] inR, int X, int Y, float[] outR)
           
 void unregisterListener(SensorEventListener listener)
           
 void unregisterListener(SensorEventListener listener, Sensor sensor)
           
 void unregisterListener(SensorListener listener)
           
 void unregisterListener(SensorListener listener, int sensors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SENSOR_ORIENTATION

public static final int SENSOR_ORIENTATION
See Also:
Constant Field Values

SENSOR_ACCELEROMETER

public static final int SENSOR_ACCELEROMETER
See Also:
Constant Field Values

SENSOR_TEMPERATURE

public static final int SENSOR_TEMPERATURE
See Also:
Constant Field Values

SENSOR_MAGNETIC_FIELD

public static final int SENSOR_MAGNETIC_FIELD
See Also:
Constant Field Values

SENSOR_LIGHT

public static final int SENSOR_LIGHT
See Also:
Constant Field Values

SENSOR_PROXIMITY

public static final int SENSOR_PROXIMITY
See Also:
Constant Field Values

SENSOR_TRICORDER

public static final int SENSOR_TRICORDER
See Also:
Constant Field Values

SENSOR_ORIENTATION_RAW

public static final int SENSOR_ORIENTATION_RAW
See Also:
Constant Field Values

SENSOR_ALL

public static final int SENSOR_ALL
See Also:
Constant Field Values

SENSOR_MIN

public static final int SENSOR_MIN
See Also:
Constant Field Values

SENSOR_MAX

public static final int SENSOR_MAX
See Also:
Constant Field Values

DATA_X

public static final int DATA_X
See Also:
Constant Field Values

DATA_Y

public static final int DATA_Y
See Also:
Constant Field Values

DATA_Z

public static final int DATA_Z
See Also:
Constant Field Values

RAW_DATA_INDEX

public static final int RAW_DATA_INDEX
See Also:
Constant Field Values

RAW_DATA_X

public static final int RAW_DATA_X
See Also:
Constant Field Values

RAW_DATA_Y

public static final int RAW_DATA_Y
See Also:
Constant Field Values

RAW_DATA_Z

public static final int RAW_DATA_Z
See Also:
Constant Field Values

STANDARD_GRAVITY

public static final float STANDARD_GRAVITY
See Also:
Constant Field Values

GRAVITY_SUN

public static final float GRAVITY_SUN
See Also:
Constant Field Values

GRAVITY_MERCURY

public static final float GRAVITY_MERCURY
See Also:
Constant Field Values

GRAVITY_VENUS

public static final float GRAVITY_VENUS
See Also:
Constant Field Values

GRAVITY_EARTH

public static final float GRAVITY_EARTH
See Also:
Constant Field Values

GRAVITY_MOON

public static final float GRAVITY_MOON
See Also:
Constant Field Values

GRAVITY_MARS

public static final float GRAVITY_MARS
See Also:
Constant Field Values

GRAVITY_JUPITER

public static final float GRAVITY_JUPITER
See Also:
Constant Field Values

GRAVITY_SATURN

public static final float GRAVITY_SATURN
See Also:
Constant Field Values

GRAVITY_URANUS

public static final float GRAVITY_URANUS
See Also:
Constant Field Values

GRAVITY_NEPTUNE

public static final float GRAVITY_NEPTUNE
See Also:
Constant Field Values

GRAVITY_PLUTO

public static final float GRAVITY_PLUTO
See Also:
Constant Field Values

GRAVITY_DEATH_STAR_I

public static final float GRAVITY_DEATH_STAR_I
See Also:
Constant Field Values

GRAVITY_THE_ISLAND

public static final float GRAVITY_THE_ISLAND
See Also:
Constant Field Values

MAGNETIC_FIELD_EARTH_MAX

public static final float MAGNETIC_FIELD_EARTH_MAX
See Also:
Constant Field Values

MAGNETIC_FIELD_EARTH_MIN

public static final float MAGNETIC_FIELD_EARTH_MIN
See Also:
Constant Field Values

PRESSURE_STANDARD_ATMOSPHERE

public static final float PRESSURE_STANDARD_ATMOSPHERE
See Also:
Constant Field Values

LIGHT_SUNLIGHT_MAX

public static final float LIGHT_SUNLIGHT_MAX
See Also:
Constant Field Values

LIGHT_SUNLIGHT

public static final float LIGHT_SUNLIGHT
See Also:
Constant Field Values

LIGHT_SHADE

public static final float LIGHT_SHADE
See Also:
Constant Field Values

LIGHT_OVERCAST

public static final float LIGHT_OVERCAST
See Also:
Constant Field Values

LIGHT_SUNRISE

public static final float LIGHT_SUNRISE
See Also:
Constant Field Values

LIGHT_CLOUDY

public static final float LIGHT_CLOUDY
See Also:
Constant Field Values

LIGHT_FULLMOON

public static final float LIGHT_FULLMOON
See Also:
Constant Field Values

LIGHT_NO_MOON

public static final float LIGHT_NO_MOON
See Also:
Constant Field Values

SENSOR_DELAY_FASTEST

public static final int SENSOR_DELAY_FASTEST
See Also:
Constant Field Values

SENSOR_DELAY_GAME

public static final int SENSOR_DELAY_GAME
See Also:
Constant Field Values

SENSOR_DELAY_UI

public static final int SENSOR_DELAY_UI
See Also:
Constant Field Values

SENSOR_DELAY_NORMAL

public static final int SENSOR_DELAY_NORMAL
See Also:
Constant Field Values

SENSOR_STATUS_UNRELIABLE

public static final int SENSOR_STATUS_UNRELIABLE
See Also:
Constant Field Values

SENSOR_STATUS_ACCURACY_LOW

public static final int SENSOR_STATUS_ACCURACY_LOW
See Also:
Constant Field Values

SENSOR_STATUS_ACCURACY_MEDIUM

public static final int SENSOR_STATUS_ACCURACY_MEDIUM
See Also:
Constant Field Values

SENSOR_STATUS_ACCURACY_HIGH

public static final int SENSOR_STATUS_ACCURACY_HIGH
See Also:
Constant Field Values

AXIS_X

public static final int AXIS_X
See Also:
Constant Field Values

AXIS_Y

public static final int AXIS_Y
See Also:
Constant Field Values

AXIS_Z

public static final int AXIS_Z
See Also:
Constant Field Values

AXIS_MINUS_X

public static final int AXIS_MINUS_X
See Also:
Constant Field Values

AXIS_MINUS_Y

public static final int AXIS_MINUS_Y
See Also:
Constant Field Values

AXIS_MINUS_Z

public static final int AXIS_MINUS_Z
See Also:
Constant Field Values
Method Detail

getSensors

public int getSensors()

getSensorList

public List<Sensor> getSensorList(int type)

getDefaultSensor

public Sensor getDefaultSensor(int type)

registerListener

public boolean registerListener(SensorListener listener,
                                int sensors)

registerListener

public boolean registerListener(SensorListener listener,
                                int sensors,
                                int rate)

unregisterListener

public void unregisterListener(SensorListener listener,
                               int sensors)

unregisterListener

public void unregisterListener(SensorListener listener)

unregisterListener

public void unregisterListener(SensorEventListener listener,
                               Sensor sensor)

unregisterListener

public void unregisterListener(SensorEventListener listener)

registerListener

public boolean registerListener(SensorEventListener listener,
                                Sensor sensor,
                                int rate)

registerListener

public boolean registerListener(SensorEventListener listener,
                                Sensor sensor,
                                int rate,
                                Handler handler)

getRotationMatrix

public static boolean getRotationMatrix(float[] R,
                                        float[] I,
                                        float[] gravity,
                                        float[] geomagnetic)

getInclination

public static float getInclination(float[] I)

remapCoordinateSystem

public static boolean remapCoordinateSystem(float[] inR,
                                            int X,
                                            int Y,
                                            float[] outR)

getOrientation

public static float[] getOrientation(float[] R,
                                     float[] values)

getAltitude

public static float getAltitude(float p0,
                                float p)

getAngleChange

public static void getAngleChange(float[] angleChange,
                                  float[] R,
                                  float[] prevR)

getRotationMatrixFromVector

public static void getRotationMatrixFromVector(float[] R,
                                               float[] rotationVector)

getQuaternionFromVector

public static void getQuaternionFromVector(float[] Q,
                                           float[] rv)


Copyright © 2008-2012. All Rights Reserved.