DeviceOrientationRequest

public final class DeviceOrientationRequest extends Object
implements Parcelable

An encapsulation of various parameters for requesting device orientation through FusedOrientationProviderClient.

Nested Class Summary

class DeviceOrientationRequest.Builder A builder for DeviceOrientationRequest

Constant Summary

long OUTPUT_PERIOD_DEFAULT Recommended frequency (50Hz / 20ms period) for users looking for a trade-off between lower battery usage and frequent orientation updates.
long OUTPUT_PERIOD_FAST This higher update frequency (200Hz / 5ms period) is for users requiring a higher level of precision, at the cost of battery usage.
long OUTPUT_PERIOD_MEDIUM This higher update frequency (100Hz / 10ms period) is for users requiring a higher level of precision, at the cost of battery usage.

Inherited Constant Summary

Field Summary

public static final Creator<DeviceOrientationRequest> CREATOR

Public Method Summary

boolean
equals(Object object)
long
getSamplingPeriodMicros()
Returns the requested sampling period in microseconds.
int
String
void
writeToParcel(Parcel parcel, int flags)

Inherited Method Summary

Constants

public static final long OUTPUT_PERIOD_DEFAULT

Recommended frequency (50Hz / 20ms period) for users looking for a trade-off between lower battery usage and frequent orientation updates. Example application: compass or navigation app.

Constant Value: 20000

public static final long OUTPUT_PERIOD_FAST

This higher update frequency (200Hz / 5ms period) is for users requiring a higher level of precision, at the cost of battery usage. Example application: AR apps where micro adjustments of orientation are required.

Constant Value: 5000

public static final long OUTPUT_PERIOD_MEDIUM

This higher update frequency (100Hz / 10ms period) is for users requiring a higher level of precision, at the cost of battery usage. Example application: apps where gesture detection is required.

Constant Value: 10000

Fields

public static final Creator<DeviceOrientationRequest> CREATOR

Public Methods

public boolean equals (Object object)

public long getSamplingPeriodMicros ()

Returns the requested sampling period in microseconds.

public int hashCode ()

public String toString ()

public void writeToParcel (Parcel parcel, int flags)