Interface Accelerometer


@Deprecated(since="2024",
            forRemoval=true)
public interface Accelerometer
Deprecated, for removal: This API element is subject to removal in a future version.
This interface is being removed with no replacement.
Interface for 3-axis accelerometers.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Interface Description
    static class  Accelerometer.Range
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type Method Description
    double getX()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Common interface for getting the x-axis acceleration.
    double getY()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Common interface for getting the y-axis acceleration.
    double getZ()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Common interface for getting the z axis acceleration.
    void setRange​(Accelerometer.Range range)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Common interface for setting the measuring range of an accelerometer.
  • Method Details

    • setRange

      void setRange​(Accelerometer.Range range)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Common interface for setting the measuring range of an accelerometer.
      Parameters:
      range - The maximum acceleration, positive or negative, that the accelerometer will measure. Not all accelerometers support all ranges.
    • getX

      double getX()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Common interface for getting the x-axis acceleration.
      Returns:
      The acceleration along the x-axis in g-forces
    • getY

      double getY()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Common interface for getting the y-axis acceleration.
      Returns:
      The acceleration along the y-axis in g-forces
    • getZ

      double getZ()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Common interface for getting the z axis acceleration.
      Returns:
      The acceleration along the z axis in g-forces