public interface DeviceUpdatesHandler
Modifier and Type | Method and Description |
---|---|
void |
onBatteryStateUpdateReceived(int batteryUpdate)
Notifies that battery state for tracked device changed.
|
void |
onCompleted(String deviceId)
Callback, that notifies that subscription was successfully closed after
HyperTrackViews.unsubscribeFromDeviceUpdates(String)
or HyperTrackViews.stopAllUpdates() invocation. |
void |
onError(Exception exception,
String deviceId)
Method will be invoked if some error will be detected, e.g.
|
void |
onLocationUpdateReceived(Location location)
Notifies that location for tracked device was changed.
|
void |
onStatusUpdateReceived(StatusUpdate statusUpdate)
Notifies that status of current device is changed.
|
void |
onTripUpdateReceived(Trip trip)
Notifies that one of active trips for current device was changed.
|
void onLocationUpdateReceived(Location location)
location
- updated data about device location.void onBatteryStateUpdateReceived(int batteryUpdate)
batteryUpdate
- new battery status - see MovementStatus.BATTERY_NORMAL
MovementStatus.BATTERY_LOW
and
MovementStatus.BATTERY_CHARGING
for values meaning.void onStatusUpdateReceived(StatusUpdate statusUpdate)
statusUpdate
- new status of current device.StatusUpdate.StatusValues
void onTripUpdateReceived(Trip trip)
trip
- that was changed (e.g. arrival estimate was updated etc).void onError(Exception exception, String deviceId)
exception
- that provides error context.deviceId
- for which error was detected.void onCompleted(String deviceId)
HyperTrackViews.unsubscribeFromDeviceUpdates(String)
or HyperTrackViews.stopAllUpdates()
invocation.deviceId
- for which subscription was stopped.