Code example for Sensor

Methods: getName

    public void onAccuracyChanged(Sensor sensor, int accuracy)
                String.format("Accuracy for sensor %s = %d",
                sensor.getName(), accuracy));
     * Generates a rotation matrix using the member data stored in 
     * accelerationValues and magneticValues. 
     * @return The rotation matrix returned from 
     * {@link android.hardware.SensorManager#getRotationMatrix(float[], float[], float[], float[])} 
     * or <code>null</code> if either <code>accelerationValues</code> or 
     * <code>magneticValues</code> is null. 
    private float[] generateRotationMatrix() 
        float[] rotationMatrix = null;