public abstract class AbstractLocationSource extends com.google.android.gms.location.LocationCallback implements LocationSource, android.location.LocationListener
| Constructor and Description |
|---|
AbstractLocationSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLocationUpdateListener(LocationUpdateListener locationUpdateListener)
Adds location update listener.
|
java.util.List<LocationUpdateListener> |
getAllLocationUpdateListeners()
Obtains the list of all added location update listeners.
|
void |
onLocationAvailability(com.google.android.gms.location.LocationAvailability locationAvailability) |
void |
onLocationChanged(android.location.Location location)
Is called when new location is found by the corresponding location source provider.
|
void |
onLocationResult(com.google.android.gms.location.LocationResult locationResult) |
void |
onProviderDisabled(java.lang.String provider) |
void |
onProviderEnabled(java.lang.String provider) |
void |
onStatusChanged(java.lang.String provider,
int status,
android.os.Bundle extras) |
void |
removeAllLocationUpdateListeners()
Removes all location update listeners.
|
void |
removeLocationUpdateListener(LocationUpdateListener locationUpdateListener)
Removes location update listener.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactivate, deactivate, getLastKnownLocationpublic void addLocationUpdateListener(LocationUpdateListener locationUpdateListener)
LocationSourceaddLocationUpdateListener in interface LocationSourcelocationUpdateListener - the listener which will be notified when new location was discovered by the location source.public void removeLocationUpdateListener(LocationUpdateListener locationUpdateListener)
LocationSourceremoveLocationUpdateListener in interface LocationSourcelocationUpdateListener - the listener which will be removed from the notification list of location updates.public void removeAllLocationUpdateListeners()
LocationSourceremoveAllLocationUpdateListeners in interface LocationSourcepublic java.util.List<LocationUpdateListener> getAllLocationUpdateListeners()
LocationSourcegetAllLocationUpdateListeners in interface LocationSourcepublic void onLocationChanged(android.location.Location location)
LocationSourceonLocationChanged in interface android.location.LocationListeneronLocationChanged in interface LocationSourcelocation - new location found by the location provider.public void onLocationResult(com.google.android.gms.location.LocationResult locationResult)
onLocationResult in class com.google.android.gms.location.LocationCallbackpublic void onLocationAvailability(com.google.android.gms.location.LocationAvailability locationAvailability)
onLocationAvailability in class com.google.android.gms.location.LocationCallbackpublic void onStatusChanged(java.lang.String provider,
int status,
android.os.Bundle extras)
onStatusChanged in interface android.location.LocationListenerpublic void onProviderEnabled(java.lang.String provider)
onProviderEnabled in interface android.location.LocationListenerpublic void onProviderDisabled(java.lang.String provider)
onProviderDisabled in interface android.location.LocationListener