Android SDK Version
  • java.lang.Object
    • com.facebook.places.model.CurrentPlaceRequestParams.Builder

public static class CurrentPlaceRequestParams.Builder
extends java.lang.Object
Describes the builder to create a CurrentPlaceRequestParams
Constructor Summary
Constructor and Description
Builder() 
Method Summary
Modifier and TypeMethod and Description
CurrentPlaceRequestParams.BuilderaddField(java.lang.String field)
Specifies a field to be added to the response.
CurrentPlaceRequestParamsbuild()
CurrentPlaceRequestParams.BuildersetLimit(int limit)
Sets the maximum number of results to be returned.
CurrentPlaceRequestParams.BuildersetLocation(Location location)
Sets the current user location.
CurrentPlaceRequestParams.BuildersetMinConfidenceLevel(CurrentPlaceRequestParams.ConfidenceLevel minConfidenceLevel)
The minimum confidence level of suggestions to return.
CurrentPlaceRequestParams.BuildersetScanMode(CurrentPlaceRequestParams.ScanMode scanMode)
Sets the scan mode to be used.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

Builder

public Builder()
Method Detail

setLocation

public CurrentPlaceRequestParams.Builder setLocation(Location location)
Sets the current user location. This parameter is optional. If a location is not provided, the SDK automatically retrieves the current device location using android.location.LocationManager.
Parameters:
location - The location at which the user is currently located.
Returns:
this builder

setScanMode

public CurrentPlaceRequestParams.Builder setScanMode(CurrentPlaceRequestParams.ScanMode scanMode)
Sets the scan mode to be used. When creating a current place request, the SDK scans for nearby Wi-Fi access points and Bluetooth Low Energy beacons. This parameter determines the behavior of that scan. High accuracy is the default value. In order to use low latency, you must specify a location on this builder.
Parameters:
scanMode - The scan mode used when generating the current place request.
Returns:
this builder

setMinConfidenceLevel

public CurrentPlaceRequestParams.Builder setMinConfidenceLevel(CurrentPlaceRequestParams.ConfidenceLevel minConfidenceLevel)
The minimum confidence level of suggestions to return. See CurrentPlaceRequestParams.ConfidenceLevel.
Parameters:
minConfidenceLevel - the minimum confidence level of suggestions to return.
Returns:
this builder

setLimit

public CurrentPlaceRequestParams.Builder setLimit(int limit)
Sets the maximum number of results to be returned.
Parameters:
limit - the maximum number of results to be returned.
Returns:
this builder

addField

public CurrentPlaceRequestParams.Builder addField(java.lang.String field)
Specifies a field to be added to the response. Refer to PlaceFields for a list of known place fields. Refer to the online Places Graph documentation for an up to date list of fields.
Parameters:
field - The field to be returned in the response PlaceFields.
Returns:
this builder