Call sdkInstance.activeTask().observe() to receive events when the active task is updated.
The observer will receive updates when task states change or when the underlying task data is changed (eta, notes, destination updates, schedules, etc.).
Observer will receive updates using TaskState model providing:
currentState - enum indicating the active order state if any. (non-null)
task - current active order data if any. (null when state is NO_TASK, non-null otherwise)
TaskStates describe the current active order state:
Order state description
new active order received from Bringg platform servers.
active order was successfully started, user is currently on the way to the first order destination.
user has arrived and is now at the current order destination.
user has left the current destination and is now on the way to the next destination of this order. next event will be ARRIVED_AT_CURRENT_DESTINATION again until all task waypoints are done.
active order is completed successfully. If more orders are available next order will become active, if not NO_TASK state event will follow this event.
active order is no longer available for the user on Bringg platform
Updated over 2 years ago