Package com.bosch.wdw
Interface WDWClientCallback
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).
-
Method Summary
Modifier and TypeMethodDescriptionvoidonAreaEntered(String tripId) TheonAreaEntered(String)callback is triggered when the user enters a relevant area.voidonAreaLeft(String tripId) TheonAreaLeft(String)callback is triggered when the user leaves a relevant area.voidonDataCollected(String data) TheonDataCollected(String)callback is triggered when there is new data available that can be sent to the backend.voidonErrorOccured(Error error) TheonErrorOccured(Error)callback is triggered when a problem has occured.voidonWarningReceived(WarningEvent warningEvent) TheonWarningReceived(WarningEvent)callback is triggered when a new wrong way driver event has been received.
-
Method Details
-
onAreaEntered
TheonAreaEntered(String)callback is triggered when the user enters a relevant area. Only after this callback is triggered, the WDW-SDK will call theonDataCollected(String)callback.- Parameters:
tripId- A randomly generated id that identifies the user within the area
-
onAreaLeft
TheonAreaLeft(String)callback is triggered when the user leaves a relevant area. After this callback has been triggered, the WDW-SDK will no longer call theonDataCollected(String)callback.- Parameters:
tripId- The id that has been created foronAreaEntered(String)
-
onDataCollected
TheonDataCollected(String)callback is triggered when there is new data available that can be sent to the backend. This callback will only be called after theWDWClient.startMonitoring()has been called.- Parameters:
data- Returning the data provided in relevant areas as string.
-
onErrorOccured
TheonErrorOccured(Error)callback is triggered when a problem has occured.- Parameters:
error- describes the issue which occured.
-
onWarningReceived
TheonWarningReceived(WarningEvent)callback is triggered when a new wrong way driver event has been received.- Parameters:
warningEvent- represents the evaluated result after message evaluation. SeeWarningEventfor detailed information.
-