LocationSettingsRequest.Builder | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Ctors | Methods | Inherited Methods | [Expand All]
public static final class

# LocationSettingsRequest.Builder

extends Object

java.lang.Object
↳ | com.google.android.gms.location.LocationSettingsRequest.Builder

## Class Overview

A builder that builds `LocationSettingsRequest`.

## Summary

Public Constructors
| LocationSettingsRequest.Builder()

Public Methods
LocationSettingsRequest.Builder | addAllLocationRequests(Collection<LocationRequest> requests) Adds a collection of `LocationRequests` that the client is interested in.
LocationSettingsRequest.Builder | addLocationRequest(LocationRequest request) Adds one `LocationRequest` that the client is interested in.
LocationSettingsRequest | build() Creates a LocationSettingsRequest that can be used with `SettingsApi`.
LocationSettingsRequest.Builder | setAlwaysShow(boolean show) This method currently does nothing.
LocationSettingsRequest.Builder | setNeedBle(boolean needBle) Sets whether the client wants BLE to be enabled.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Public Constructors

#### public LocationSettingsRequest.Builder ()

## Public Methods

#### public LocationSettingsRequest.Builder addAllLocationRequests (Collection<LocationRequest> requests)

Adds a collection of `LocationRequests` that the client is interested in. Settings will be checked for optimal performance of all `LocationRequests`.

#### public LocationSettingsRequest.Builder addLocationRequest (LocationRequest request)

Adds one `LocationRequest` that the client is interested in. Settings will be checked for optimal performance of all `LocationRequests`.

#### public LocationSettingsRequest build ()

Creates a LocationSettingsRequest that can be used with `SettingsApi`.

#### public LocationSettingsRequest.Builder setAlwaysShow (boolean show)

This method currently does nothing. In a future release, we may introduce the ability for users to suppress future dialogs from a given app. Calling this method before invoking the dialog will hide this option from users. Use this method if and only if your dialog is the result of an explicit user-initiated action that requires location. Canceling this dialog should also cancel the initiated action in your app.

#### public LocationSettingsRequest.Builder setNeedBle (boolean needBle)

Sets whether the client wants BLE to be enabled.