Interface ILocationListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback interface used in the location service
ILocationService and for GeoProps.- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptionvoidonLocationChanged(IClientSessionGyro clientGyro, DeviceLocation deviceLocation) Called when the device location has been received or changed.default voidonLocationRequestCancelled(IClientSessionGyro clientGyro) Called when a location requested withGeoProps.requestLocation(ILocationListener)orILocationService.requestLocation(ILocationListener)will never arrive: the client session it was requested from is disposed of, so the client is gone and cannot answer.
Method Details
onLocationChanged
Called when the device location has been received or changed.The
clientGyroparameter is always set when the location has been updated when the program is running in the foreground and that the client is a browser or the program does not support background location updates.- Parameters:
clientGyro- The client session's gyro when possible to find, null otherwise.deviceLocation- The device location.
onLocationRequestCancelled
Called when a location requested withGeoProps.requestLocation(ILocationListener)orILocationService.requestLocation(ILocationListener)will never arrive: the client session it was requested from is disposed of, so the client is gone and cannot answer. The application requests the location again on another client session if it still needs it.This is a default method with an empty body: a listener compiled before it existed keeps compiling and working, it is simply not told.
- Parameters:
clientGyro- The client session that is disposed of.