public interface ServiceClient
Core.registerCallback(ServiceClientCallback)
to obtain a reference to an actual service client.Core
,
ServiceClientCallback
Modifier and Type | Method and Description |
---|---|
void |
bootCore(CoreBootParameter coreBootDataParameter)
This method is the first method that must be called after having successfully bound to the Core service.
|
void |
changeOdometer(OdometerValueParameter odometerValueParameter)
A client can change the odometer in the dongle.
|
void |
disconnectFromDongle() |
void |
disconnectFromServer() |
void |
reconnectToDongle()
Normally a custom app doesn't need to connect to the dongle manually.
|
void |
reconnectToServer()
Normally the custom app doesn't need to connect to the server manually.
|
void |
requestCoreState()
A client can request internal status information like version information or activation status from the Core.
|
void |
requestDeviceStatus()
A client can request status information like odometer or disconnect count from the dongle.
|
void |
requestObdDtcList()
A client can a list with DTCs from the dongle.
|
void |
sendClockSyncReasonForDeviceSetup(DisconnectReasonParameter disconnectReasonParameter)
Sends a reason for a clock sync request in case the dongle is set up initially or after a the Core recognized a disconnect of the dongle in the meantime.
|
void |
sendClockSyncReasonForDownload(DisconnectReasonParameter disconnectReasonParameter)
Sends a reason for a clock sync request requested by the dongle before a download of driving data can be initiated.
|
void |
sendFcmRegistrationToken(FcmRegistrationParameter fcmRegistrationParameter)
Sends the given FCM registration token with the given sender ID to the WEBFLEET server,
so that WEBFLEET is able to send push notifications back to the smartphone registered with the given token.
|
void |
sendGcmRegistrationToken(GcmRegistrationParameter gcmRegistrationParameter)
Deprecated.
|
void |
setDongleConnectionIdleTimeout(Long time)
Sets the time after an idle connection to the dongle is closed.
|
void |
startActivation()
Starts the activation of a dongle.
|
void |
startDrivingProfileRealtimeTransmission()
A client can start the real time transmission of driving profile data with a predefined sampling rate.
|
void |
startEngineStatusUpdatesTransmission()
Activates the transmission of engine status updates.
|
void |
startObdRealtimeTransmission()
A client can start the real time transmission of OBD data with a predefined sampling rate.
|
void |
startSync()
A client can trigger the sync process calling this method, causing driving data to be downloaded from the dongle
and uploaded to the server.
|
void |
stopDrivingProfileRealtimeTransmission()
Stops the real-time transmission of driving profile data that was started before via
startDrivingProfileRealtimeTransmission() . |
void |
stopEngineStatusUpdatesTransmission()
Deactivates the transmission of engine status updates.
|
void |
stopObdRealtimeTransmission()
Stops the real-time transmission of OBD data that was started before via
startObdRealtimeTransmission() . |
void |
updateFirmware(FirmwareUpdateParameter firmwareUpdateParameter)
Initiates the firmware update after having received the required firmware file id via
ServiceClientCallback.onFirmwareUpdateAvailable(com.tomtom.business.ubi.commons.api.ServiceClientCallback.FirmwareUpdateAvailableResponse) |
void sendClockSyncReasonForDownload(DisconnectReasonParameter disconnectReasonParameter)
ServiceClientCallback.onClockSyncReasonForDownloadRequired()
. If the user of the custom app has
entered a reason the custom app uses this method to send back the reason after which the Core will initiate the download of the driving data.
If the clock was successfully synchronized in the dongle the Core calls
ServiceClientCallback.onClockSyncSuccesful(com.tomtom.business.ubi.commons.api.ServiceClientCallback.ClockSyncForActionResponse)
.void sendClockSyncReasonForDeviceSetup(DisconnectReasonParameter disconnectReasonParameter)
ServiceClientCallback.onClockSyncSuccesful(com.tomtom.business.ubi.commons.api.ServiceClientCallback.ClockSyncForActionResponse)
.void bootCore(CoreBootParameter coreBootDataParameter)
reconnectToDongle()
or
reconnectToServer()
to trigger another series of reconnection attempts.ServiceClientCallback.onActivationStart()
is called and the Core tries to activate the
dongle with data which were specified with the CoreBootParameter
. Note: CoreBootParameter.customerActivationKey
is
required in this case.
ServiceClientCallback.onActivationFinished()
is called.
ServiceClientCallback.onError(com.tomtom.business.ubi.commons.api.ServiceClientCallback.UbiErrorCodeResponse)
is called.
UbiErrorCode.ACTIVATION_FINALLY_FAILED_ON_DONGLE
is sent back.
UbiErrorCode.CONNECTION_FINALLY_FAILED_AUTHENTICATION_FAILURE
or UbiErrorCode.CONNECTION_FINALLY_FAILED_TIMEOUT_OR_OTHER_REASON
are returned.
CoreBootParameter
for more information on which parameter is mandatory or optional.void requestCoreState()
ServiceClientCallback.onCoreState(com.tomtom.business.ubi.commons.api.ServiceClientCallback.CoreStateResponse)
.void requestDeviceStatus()
ServiceClientCallback.onDeviceStatus(com.tomtom.business.ubi.commons.api.ServiceClientCallback.DeviceStatusResponse)
.void requestObdDtcList()
ServiceClientCallback.onObdDtcList(com.tomtom.business.ubi.commons.api.ServiceClientCallback.ObdDtcListResponse)
.void changeOdometer(OdometerValueParameter odometerValueParameter)
ServiceClientCallback.onOdometerChange(com.tomtom.business.ubi.commons.api.ServiceClientCallback.OdometerChangeResponse)
.void startObdRealtimeTransmission()
ServiceClientCallback.onObdRealTimeDatagram(com.tomtom.business.ubi.commons.api.ServiceClientCallback.ObdRealTimeDatagramResponse)
per second (subject to change) even if no OBD data can be acquired from the bus.
The Core sends these datagrams as long as stopObdRealtimeTransmission()
hasn't been called by a client.void startDrivingProfileRealtimeTransmission()
ServiceClientCallback.onDrivingProfileRealTimeDatagram(com.tomtom.business.ubi.commons.api.ServiceClientCallback.DrivingProfileRealTimeDatagramResponse)
per second (subject to change).
The Core sends these datagrams as long as stopDrivingProfileRealtimeTransmission()
hasn't been called by a client.void startSync()
During download the core answers with several calls to ServiceClientCallback.onDownloadStatusUpdate(ServiceClientCallback.DownloadStatusResponse)
.
The download of driving data does not necessarily need a dual connection to dongle and server at the same
time. A user could download the driving data from the dongle in an underground parking lot without connection to
the Internet. Afterwards when he gains access to the Internet the downloaded driving data will be automatically
uploaded to the server. Once the Upload to the server finished the Core will notify the client with a calls to
ServiceClientCallback.onUploadToServerFinished(UploadToServerFinishedResponse)
, indicating that the sync
process has finished.
Note: The Core might answer with ServiceClientCallback.onClockSyncReasonForDownloadRequired()
requesting a reason for having disconnected the dongle previously before actually starting to download the
driving data from the dongle.
CAUTION: This method should not be executed frequently, as it will wear off the
dongle hardware and cause unnecessary messages to be sent. Usually a good moment to call this method is on
engine off and on, see ServiceClientCallback.onEngineStatusUpdate(com.tomtom.business.ubi.commons.api.ServiceClientCallback.EngineStatusResponse)
for details. However a sync should only
be executed if there is no pending sync. Currently an application needs to track the synchronization process
itself. Mind that even when connected to the Internet, there might be no call to ServiceClientCallback.onUploadToServerFinished(UploadToServerFinishedResponse)
under bad network conditions or
when there are server issues. Work with an appropriate timeout in this case.
void stopObdRealtimeTransmission()
startObdRealtimeTransmission()
.void stopDrivingProfileRealtimeTransmission()
startDrivingProfileRealtimeTransmission()
.void updateFirmware(FirmwareUpdateParameter firmwareUpdateParameter)
ServiceClientCallback.onFirmwareUpdateAvailable(com.tomtom.business.ubi.commons.api.ServiceClientCallback.FirmwareUpdateAvailableResponse)
void reconnectToDongle()
ServiceClientCallback.onConnectionStatusUpdate(com.tomtom.business.ubi.commons.api.ServiceClientCallback.ConnectionStatusResponse)
with ConnectionStatus.CONNECTING_FINALLY_FAILED
. Then a client can manually wake up the Core to try again to get a connection to
the dongle for another series of attempts.void reconnectToServer()
ServiceClientCallback.onConnectionStatusUpdate(com.tomtom.business.ubi.commons.api.ServiceClientCallback.ConnectionStatusResponse)
with ConnectionStatus.CONNECTING_FINALLY_FAILED
. Then a client can manually wake up the Core to try again to get a connection to
the server for another series of attempts.void setDongleConnectionIdleTimeout(Long time)
time
- Time in milliseconds.void startEngineStatusUpdatesTransmission()
ServiceClientCallback.onEngineStatusUpdate(EngineStatusResponse)
.void stopEngineStatusUpdatesTransmission()
void sendFcmRegistrationToken(FcmRegistrationParameter fcmRegistrationParameter)
@Deprecated void sendGcmRegistrationToken(GcmRegistrationParameter gcmRegistrationParameter)
sendFcmRegistrationToken(com.tomtom.business.ubi.commons.api.FcmRegistrationParameter)
insteadvoid startActivation()
CoreBootParameter.automaticDongleActivation
), this method doesn't need to be called.void disconnectFromDongle()
void disconnectFromServer()