public static final class LocationRequest.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Builder(LocationRequest copy) |
Modifier and Type | Method and Description |
---|---|
LocationRequest.Builder |
addBeaconFilter(BeaconFilter beaconFilter)
Adds a beacon filter to be handled during scan time, otherwise only Situm beacons
will be scanned.
|
LocationRequest.Builder |
addBeaconFilters(java.util.List<BeaconFilter> beaconFilters)
Adds beacon filters to be handled during scan time, otherwise only Situm beacons
will be scanned.
|
LocationRequest |
build() |
LocationRequest.Builder |
buildingIdentifier(java.lang.String buildingIdentifier)
Set the building identifier of the building where you will start positioning.
|
LocationRequest.Builder |
foregroundServiceNotification(Notification foregroundServiceNotification)
Set the notification used if the service is running in foreground.
|
LocationRequest.Builder |
indoorProvider(LocationRequest.IndoorProvider indoorProvider)
Set the indoor location provider.
|
LocationRequest.Builder |
interval(int interval)
Set the desired interval for location updates, in milliseconds.This interval is inexact, the
service will try to obtain location updates for your application at this interval.
|
LocationRequest.Builder |
motionMode(LocationRequest.MotionMode motionMode)
(EXPERIMENTAL) Set the motion mode.
|
LocationRequest.Builder |
outdoorLocationOptions(OutdoorLocationOptions outdoorLocationOptions)
Set outdoor location options.
|
LocationRequest.Builder |
realtimeUpdateInterval(LocationRequest.RealtimeUpdateInterval realtimeUpdateInterval)
Set the interval to upload locations to the realtime.
|
LocationRequest.Builder |
smallestDisplacement(float smallestDisplacement)
Set the minimum displacement between location updates (in meters).
|
LocationRequest.Builder |
useBatterySaver(java.lang.Boolean useBatterySaver)
(EXPERIMENTAL) This option enables battery saving when device is idle and not moving.
|
LocationRequest.Builder |
useBle(boolean useBle)
Set if you want to use BLE for positioning.
|
LocationRequest.Builder |
useDeadReckoning(boolean useDeadReckoning)
(EXPERIMENTAL) Set if you want to use dead reckoning to get fast position updates using only
the inertial sensors, between the server position updates.
|
LocationRequest.Builder |
useForegroundService(boolean useForegroundService)
(EXPERIMENTAL) Run the service in foreground.
|
LocationRequest.Builder |
useWifi(boolean useWifi)
Set if you want to use Wifi for positioning.
|
public Builder()
public Builder(LocationRequest copy)
public LocationRequest.Builder buildingIdentifier(java.lang.String buildingIdentifier)
public LocationRequest.Builder interval(int interval)
smallestDisplacement(float)
you may
not receive updates at the desired interval if the other condition isn't met.
useDeadReckoning(boolean)
will be disabled.
Default value is LocationRequest.DEFAULT_INTERVAL
public LocationRequest.Builder indoorProvider(LocationRequest.IndoorProvider indoorProvider)
LocationRequest.IndoorProvider.INPHONE
public LocationRequest.Builder useBle(boolean useBle)
public LocationRequest.Builder useWifi(boolean useWifi)
public LocationRequest.Builder motionMode(LocationRequest.MotionMode motionMode)
LocationRequest.MotionMode.BY_FOOT
public LocationRequest.Builder useForegroundService(boolean useForegroundService)
LocationRequest.setForegroundServiceNotification(Notification)
useForegroundService
- true to run the service in foreground, false otherwisepublic LocationRequest.Builder useDeadReckoning(boolean useDeadReckoning)
public LocationRequest.Builder foregroundServiceNotification(Notification foregroundServiceNotification)
LocationRequest.setUseForegroundService(Boolean)
is trueforegroundServiceNotification
- the notification to use running in foregroundpublic LocationRequest.Builder outdoorLocationOptions(OutdoorLocationOptions outdoorLocationOptions)
outdoorLocationOptions
- the outdoor location optionsOutdoorLocationOptions
public LocationRequest.Builder addBeaconFilter(BeaconFilter beaconFilter)
public LocationRequest.Builder addBeaconFilters(java.util.List<BeaconFilter> beaconFilters)
public LocationRequest.Builder useBatterySaver(java.lang.Boolean useBatterySaver)
public LocationRequest.Builder smallestDisplacement(float smallestDisplacement)
LocationRequest.DEFAULT_SMALLEST_DISPLACEMENT
.
interval(int)
you may
not receive updates at the desired interval if the other condition isn't met.
useDeadReckoning(boolean)
will be disabled.smallestDisplacement
- the smallest displacement (in meters) the user must move between location updatespublic LocationRequest.Builder realtimeUpdateInterval(LocationRequest.RealtimeUpdateInterval realtimeUpdateInterval)
realtimeUpdateInterval
- the interval to upload locations to the realtimepublic LocationRequest build()