public interface LocationSource
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activates the provider.
|
void |
addLocationUpdateListener(LocationUpdateListener locationUpdateListener)
Adds location update listener.
|
void |
deactivate()
Deactivates this provider.
|
java.util.List<LocationUpdateListener> |
getAllLocationUpdateListeners()
Obtains the list of all added location update listeners.
|
android.location.Location |
getLastKnownLocation()
Last valid location of the user.
|
void |
onLocationChanged(android.location.Location location)
Is called when new location is found by the corresponding location source provider.
|
void |
removeAllLocationUpdateListeners()
Removes all location update listeners.
|
void |
removeLocationUpdateListener(LocationUpdateListener locationUpdateListener)
Removes location update listener.
|
@Nullable android.location.Location getLastKnownLocation()
void activate()
void deactivate()
void addLocationUpdateListener(LocationUpdateListener locationUpdateListener)
locationUpdateListener - the listener which will be notified when new location was discovered by the location source.void removeLocationUpdateListener(LocationUpdateListener locationUpdateListener)
locationUpdateListener - the listener which will be removed from the notification list of location updates.void removeAllLocationUpdateListeners()
java.util.List<LocationUpdateListener> getAllLocationUpdateListeners()
void onLocationChanged(android.location.Location location)
location - new location found by the location provider.