MotionState
class MotionState : Parcelable
| kotlin.Any | |
| ↳ | android.ranging.MotionState |
Represents the motion state of a ranging device.
Summary
| Constants | |
|---|---|
| static Int |
Large motion was detected (orientation change >= 10°). |
| static Int |
Moderate motion was detected (orientation change between 7° and 10°). |
| static Int |
Motion was not detected (orientation change < 5°). |
| static Int |
Slight motion was detected (orientation change between 5° and 7°). |
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
MotionState(motionState: Int)Constructs a new |
|
| Public methods | |
|---|---|
| Int | |
| Boolean | |
| Int |
Returns the motion state of the device. |
| Int |
hashCode() |
| String |
toString() |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<MotionState!> | |
Constants
MOTION_LARGE
static val MOTION_LARGE: Int
Large motion was detected (orientation change >= 10°).
Value: 3MOTION_MODERATE
static val MOTION_MODERATE: Int
Moderate motion was detected (orientation change between 7° and 10°).
Value: 2MOTION_NOT_DETECTED
static val MOTION_NOT_DETECTED: Int
Motion was not detected (orientation change < 5°).
Value: 0MOTION_SLIGHT
static val MOTION_SLIGHT: Int
Slight motion was detected (orientation change between 5° and 7°).
Value: 1Public constructors
MotionState
MotionState(motionState: Int)
Constructs a new MotionState.
| Parameters | |
|---|---|
motionState |
Int: The motion state of the device. Must be one of MOTION_NOT_DETECTED, MOTION_SLIGHT, MOTION_MODERATE, or MOTION_LARGE. Value is one of the following: |
Public methods
describeContents
fun describeContents(): Int
getMotionState
fun getMotionState(): Int
Returns the motion state of the device.
| Return | |
|---|---|
Int |
the motion state, which is one of MOTION_NOT_DETECTED, MOTION_SLIGHT, MOTION_MODERATE, or MOTION_LARGE. Value is one of the following: |
hashCode
fun hashCode(): Int
toString
fun toString(): String
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of the following:
|
Properties
CREATOR
static val CREATOR: Parcelable.Creator<MotionState!>