A builder for DeviceOrientationRequest.
|
Builder(long samplingPeriodMicros)
Constructs a new builder, requiring to provide a
samplingPeriodMicros.
|
|
|
Builder(DeviceOrientationRequest
src)
Constructs a new builder with values copied from a given
DeviceOrientationRequest.
|
| DeviceOrientationRequest |
build()
Builds a new
DeviceOrientationRequest.
|
| DeviceOrientationRequest.Builder |
setSamplingPeriodMicros(long samplingPeriodMicros)
Sets the requested period (in microseconds) for device orientation updates.
|
Constructs a new builder, requiring to provide a
samplingPeriodMicros.
Constructs a new builder with values copied from a given DeviceOrientationRequest.
Builds a new DeviceOrientationRequest.
Sets the requested period (in microseconds) for device orientation updates.
The device orientation client will attempt to obtain updates for your application at
least at the specified interval. Therefore, it has a direct influence on the amount of
power used by your application. By default, we recommend a sampling period of
20_000 microseconds (for example, 50Hz).
This interval is not guaranteed to be used. Your app may not receive updates at all (if no device orientation sources are available). It may also receive them faster or slower than requested (for example if other applications are requesting device orientation at a faster interval, or a sampling rate is not supported by the device).
| IllegalArgumentException | if the interval is less than zero or equal to Long.MAX_VALUE |
|---|