LastLocationRequest.Builder

public static class LastLocationRequest.Builder extends Object

A builder for LastLocationRequest.

Public Constructor Summary

Builder()
Constructs a new builder with default values.
Builder(LastLocationRequest request)
Constructs a new builder with values copied from the given LastLocationRequest.

Public Method Summary

LastLocationRequest
build()
Builds a new LastLocationRequest.
LastLocationRequest.Builder
setGranularity(int granularity)
Sets the Granularity of locations returned for this request.
LastLocationRequest.Builder
setMaxUpdateAgeMillis(long maxUpdateAgeMillis)
Sets the maximum age of any location returned for this request.

Inherited Method Summary

Public Constructors

public Builder ()

Constructs a new builder with default values.

public Builder (LastLocationRequest request)

Constructs a new builder with values copied from the given LastLocationRequest.

Public Methods

public LastLocationRequest build ()

Builds a new LastLocationRequest.

public LastLocationRequest.Builder setGranularity (int granularity)

Sets the Granularity of locations returned for this request. This controls whether fine or coarse locations may be returned.

The default value is Granularity.GRANULARITY_PERMISSION_LEVEL.

public LastLocationRequest.Builder setMaxUpdateAgeMillis (long maxUpdateAgeMillis)

Sets the maximum age of any location returned for this request. A value of Long.MAX_VALUE represents an effectively unbounded maximum age.

The default value is Long.MAX_VALUE.