Package-level declarations

Types

Link copied to clipboard
class Acceleration(val x: Float, val y: Float, val z: Float)

Acceleration is a data class that holds the X, Y, and Z values of a motion event.

Link copied to clipboard
class DeviceMotion(val gravity: Gravity, val acceleration: Acceleration, val orientation: Orientation, val magneticField: MagneticField)

DeviceMotion is a data class that holds the acceleration data of a motion event, along with any additional data that may be returned in the future.

Link copied to clipboard
class Gravity(val x: Float, val y: Float, val z: Float)

Gravity is a data class that holds the X, Y, and Z values of a motion event.

Link copied to clipboard
class MagneticField(val x: Float, val y: Float, val z: Float)

MagneticField is a data class that holds the x, y, and z values of a motion event in degrees.

Link copied to clipboard
class MotionDistributor(context: Context, dispatcher: CoroutineDispatcher = Dispatchers.Main)

This class is responsible for distributing motion events to listeners. It listens for motion events from the MotionManager and notifies the listeners.

Link copied to clipboard
class Orientation(val yaw: Float, val pitch: Float, val roll: Float)

Orientation is a data class that holds the yaw, pitch, and roll values of a motion event in degrees.