AI-generated Key Takeaways
-
NavInfo.Builder
is used to create instances ofNavInfo
, providing navigation-related information. -
It offers methods to set various navigation details such as current step, distances to destinations, time estimations, and remaining steps.
-
Developers can use
NavInfo.builder()
to obtain an instance of the builder and then chain the setter methods to configure the desired navigation information. -
Finally, the
build()
method is called to create an immutableNavInfo
object with the specified attributes. -
This class is part of the Google Maps Platform Turn-by-Turn Navigation Android SDK, aiding in building navigation experiences.
Builder for NavInfo. An instance can be obtained using NavInfo.builder().
Public Method Summary
NavInfo |
build()
|
NavInfo.Builder |
setCurrentStep(StepInfo currentStep)
|
NavInfo.Builder |
setDistanceToCurrentStepMeters(Integer distanceToCurrentStepMeters)
|
NavInfo.Builder |
setDistanceToFinalDestinationMeters(Integer distanceToFinalDestinationMeters)
|
NavInfo.Builder |
setDistanceToNextDestinationMeters(Integer distanceToNextDestinationMeters)
|
NavInfo.Builder |
setNavState(int navState)
|
NavInfo.Builder |
setRemainingSteps(StepInfo[] remainingSteps)
|
NavInfo.Builder |
setRouteChanged(boolean routeChanged)
|
NavInfo.Builder |
setTimeToCurrentStepSeconds(Integer timeToCurrentStepSeconds)
|
NavInfo.Builder |
setTimeToFinalDestinationSeconds(Integer timeToFinalDestinationSeconds)
|
NavInfo.Builder |
setTimeToNextDestinationSeconds(Integer timeToNextDestinationSeconds)
|
Inherited Method Summary
Public Methods
public NavInfo.Builder setDistanceToCurrentStepMeters (Integer distanceToCurrentStepMeters)
Parameters
distanceToCurrentStepMeters |
---|
public NavInfo.Builder setDistanceToFinalDestinationMeters (Integer distanceToFinalDestinationMeters)
Parameters
distanceToFinalDestinationMeters |
---|
public NavInfo.Builder setDistanceToNextDestinationMeters (Integer distanceToNextDestinationMeters)
Parameters
distanceToNextDestinationMeters |
---|
public NavInfo.Builder setTimeToCurrentStepSeconds (Integer timeToCurrentStepSeconds)
Parameters
timeToCurrentStepSeconds |
---|
public NavInfo.Builder setTimeToFinalDestinationSeconds (Integer timeToFinalDestinationSeconds)
Parameters
timeToFinalDestinationSeconds |
---|
public NavInfo.Builder setTimeToNextDestinationSeconds (Integer timeToNextDestinationSeconds)
Parameters
timeToNextDestinationSeconds |
---|