startReceivingTripLocationUpdates

Starts delivering periodic trip location updates to the provided listener. To stop the updates, call stopReceivingTripLocationUpdates.

  • If this method returns SUCCESS, the provided TripLocationUpdatesListener becomes the active listener. A previously registered listener will no longer receive trip location updates.
  • If this method returns any value other than SUCCESS, no changes will be made to the previously registered listener. It remains active and continues receiving location updates.

Throws SdkException if the SDK is not initialized.

Return

A TripLocationUpdatesStartResult describing whether updates were started successfully or the reason they could not be started. If the result is not SUCCESS, any previously registered listener is left unchanged.

Parameters

intervalInSeconds

The desired time interval, in seconds, between successive location updates. Must be at least 1 second. The actual delivery cadence may vary depending on system conditions.

listener

A callback invoked on the main thread with the latest TripLocation once available.

Throws

if the SDK is not initialized.

if the provider listener is null.