Android – Tempo tracking
Use Tempo to understand your customers’ estimated time of arrival (ETA) at a particular location.
After Tempo tracking is started, Point SDK will start Tempo Updates from device calculating and updating the ETA of the user for a Zone. The Zone and
destinationId are configured in Canvas.
Tempo Updates interval can be manually configured, but by default are sent every 60 secs for 30 minutes.
To start tempo tracking for a user, call Point SDK API startTempoTracking:
ServiceManager.startTempoTracking(@NonNull String destinationId, @NonNull TempoStatusListener statusListener)
destinationIdis the Id assigned to the Zone in Canvas for which Tempo tracking can be started.
statusListeneris the implementation of Tempo status callbacks to receive Tempo lifecycle events and errors.
tempoStarted()will be called when tracking starts successfully.
tempoStopped()will be called when tracking stops successfully.
tempoStartError(BDError)will be called if an error occurs when starting Tempo tracking.
Errors reported are:
TempoInvalidDestinationIdErrorthrown when the
destinationIdis not valid
TempoAlreadyInProgressErrorthrown when already Tempo tracking is ongoing and a new startTempoTracking request is called
To stop Tempo tracking for a user, call the Point SDK API method stopTempoTracking:
TempoStatusListener.tempoStopped() will be called once Tempo tracking has ceased.
Tempo tracking will be stopped by the following events:
- Stopped by App using stopTempoTracking() API
- When Point SDK logout occurs
- Tempo timer expires (by default after 30 minutes from Tempo start)
After Tempo is stopped due to any of the above reasons, TempoStop event is sent from Point SDK to the server for transmission via webhook.