Interface LiveLocationListener
-
- All Implemented Interfaces:
public interface LiveLocationListenerListener for live location sharing requests.
-
-
Method Summary
Modifier and Type Method Description abstract Result<Unit>onUpdateLiveLocationPrecondition(Location location)Run precondition for the request. abstract UnitonQueryActiveLocationsResult(Result<List<Location>> result)Called when the result of ChatClient.queryActiveLocations is received. abstract UnitonUpdateLiveLocationResult(Location location, Result<Location> result)Called when the result of ChatClient.updateLiveLocation is received. abstract UnitonStopLiveLocationSharingResult(Location location, Result<Location> result)Called when the result of ChatClient.stopLiveLocationSharing is received. abstract UnitonStartLiveLocationSharingResult(Location location, Result<Location> result)Called when the result of ChatClient.startLiveLocationSharing is received. -
-
Method Detail
-
onUpdateLiveLocationPrecondition
abstract Result<Unit> onUpdateLiveLocationPrecondition(Location location)
Run precondition for the request. If it returns Result.Success then the request is run otherwise it returns Result.Failure and no request is made.
- Parameters:
location- The location to be updated.- Returns:
Result.Success if precondition passes, otherwise Result.Failure.
-
onQueryActiveLocationsResult
abstract Unit onQueryActiveLocationsResult(Result<List<Location>> result)
Called when the result of ChatClient.queryActiveLocations is received.
- Parameters:
result- The result of the query, which is a list of active locations.
-
onUpdateLiveLocationResult
abstract Unit onUpdateLiveLocationResult(Location location, Result<Location> result)
Called when the result of ChatClient.updateLiveLocation is received.
- Parameters:
location- The location used in the request.result- The result of the request.
-
onStopLiveLocationSharingResult
abstract Unit onStopLiveLocationSharingResult(Location location, Result<Location> result)
Called when the result of ChatClient.stopLiveLocationSharing is received.
- Parameters:
location- The location used in request.result- The result of the request.
-
onStartLiveLocationSharingResult
abstract Unit onStartLiveLocationSharingResult(Location location, Result<Location> result)
Called when the result of ChatClient.startLiveLocationSharing is received.
- Parameters:
location- The location used in the request.result- The result of the request.
-
-
-
-