public interface WDWClientCallback
The WDWClientCallback needs to be implemented to react on events triggered by the WDW-SDK.
The callbacks are called from different threads. The implementation should be minimal. If UI objects have to be manipulated, you have to run your code on the UI thread using Activity.runOnUiThread(Runnable).
| Modifier and Type | Method and Description |
|---|---|
void |
onAreaEntered(java.lang.String tripId)
The
onAreaEntered(String) callback is triggered when the user enters a relevant area. |
void |
onAreaLeft(java.lang.String tripId)
The
onAreaLeft(String) callback is triggered when the user leaves a relevant area. |
void |
onDataCollected(java.lang.String data)
The
onDataCollected(String) callback is triggered when there is new data available that can be sent to the backend. |
void |
onErrorOccured(Error error)
The
onErrorOccured(Error) callback is triggered when a problem has occured. |
void |
onWarningReceived(WarningEvent warningEvent)
The
onWarningReceived(WarningEvent) callback is triggered when a new wrong way driver event has been received. |
void onAreaEntered(java.lang.String tripId)
onAreaEntered(String) callback is triggered when the user enters a relevant area.
Only after this callback is triggered, the WDW-SDK will call the onDataCollected(String) callback.tripId - A randomly generated id that identifies the user within the areavoid onAreaLeft(java.lang.String tripId)
onAreaLeft(String) callback is triggered when the user leaves a relevant area.
After this callback has been triggered, the WDW-SDK will no longer call the onDataCollected(String) callback.tripId - The id that has been created for onAreaEntered(String)void onDataCollected(java.lang.String data)
onDataCollected(String) callback is triggered when there is new data available that can be sent to the backend.
This callback will only be called after the WDWClient.startMonitoring() has been called.data - Returning the data provided in relevant areas as string.void onErrorOccured(Error error)
onErrorOccured(Error) callback is triggered when a problem has occured.error - describes the issue which occured.void onWarningReceived(WarningEvent warningEvent)
onWarningReceived(WarningEvent) callback is triggered when a new wrong way driver event has been received.warningEvent - represents the evaluated result after message evaluation. See WarningEvent for
detailed information.