public class DefaultLocationProvider extends BaseLocationProvider implements LocationListener
| Constructor and Description |
|---|
DefaultLocationProvider(Context context) |
| Modifier and Type | Method and Description |
|---|---|
Location |
getCurrentLocation()
Request the current (or last) known location.
|
void |
initialize(Context context) |
void |
onLocationChanged(Location location) |
void |
onProviderDisabled(String provider) |
void |
onProviderEnabled(String provider) |
void |
onStatusChanged(String provider,
int status,
Bundle extras) |
void |
start()
Start the process of acquiring location updates.
|
void |
stop()
Stop the process of acquiring location updates.
|
clearLocationListeners, notifyLocationUpdate, registerLocationListener, unregisterLocationListenerpublic DefaultLocationProvider(Context context)
public void initialize(Context context)
public Location getCurrentLocation()
LocationProvidergetCurrentLocation in interface LocationProviderpublic void start()
LocationProviderstart in interface LocationProviderpublic void stop()
LocationProviderstop in interface LocationProviderpublic void onLocationChanged(Location location)
onLocationChanged in interface LocationListenerpublic void onStatusChanged(String provider, int status, Bundle extras)
onStatusChanged in interface LocationListenerpublic void onProviderEnabled(String provider)
onProviderEnabled in interface LocationListenerpublic void onProviderDisabled(String provider)
onProviderDisabled in interface LocationListener