public class FusedLocationSource extends AbstractLocationSource implements com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks, com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener, com.tomtom.online.sdk.common.util.Contextable
LocationUpdateListener to notify about new location updates.| Constructor and Description |
|---|
FusedLocationSource(android.content.Context context,
com.google.android.gms.location.LocationRequest locationRequest)
Default constructor to create fused location source implementation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activates the provider.
|
void |
activate(com.google.android.gms.location.LocationRequest locationRequest) |
void |
deactivate()
Deactivates this provider.
|
android.content.Context |
getContext() |
android.location.Location |
getLastKnownLocation()
Last valid location of the user.
|
void |
onConnected(android.os.Bundle bundle) |
void |
onConnectionFailed(com.google.android.gms.common.ConnectionResult connectionResult) |
void |
onConnectionSuspended(int i) |
addLocationUpdateListener, getAllLocationUpdateListeners, onLocationAvailability, onLocationChanged, onLocationResult, onProviderDisabled, onProviderEnabled, onStatusChanged, removeAllLocationUpdateListeners, removeLocationUpdateListenerpublic FusedLocationSource(android.content.Context context,
com.google.android.gms.location.LocationRequest locationRequest)
public android.location.Location getLastKnownLocation()
LocationSourcegetLastKnownLocation in interface LocationSourcepublic void activate()
LocationSourceactivate in interface LocationSourcepublic void activate(com.google.android.gms.location.LocationRequest locationRequest)
public void deactivate()
LocationSourcedeactivate in interface LocationSourcepublic void onConnected(@Nullable
android.os.Bundle bundle)
onConnected in interface com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbackspublic void onConnectionSuspended(int i)
onConnectionSuspended in interface com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbackspublic void onConnectionFailed(@NonNull
com.google.android.gms.common.ConnectionResult connectionResult)
onConnectionFailed in interface com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListenerpublic android.content.Context getContext()
getContext in interface com.tomtom.online.sdk.common.util.Contextable