DeviceOrientationRequest

public final classDeviceOrientationRequestextendsObject
implementsParcelable

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

Nested Class Summary

class DeviceOrientationRequest.Builder A builder forDeviceOrientationRequest.

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 finalCreator<DeviceOrientationRequest> CREATOR

Public Method Summary

boolean
equals(Objectobject)
long
getSamplingPeriodMicros()
Returns the requested sampling period in microseconds.
int
String
void
writeToParcel(Parcelparcel, 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 finalCreator<DeviceOrientationRequest> CREATOR

Public Methods

public booleanequals(Objectobject)

public longgetSamplingPeriodMicros()

Returns the requested sampling period in microseconds.

public inthashCode()

publicStringtoString()

public voidwriteToParcel(Parcelparcel, int flags)