The main entry point for location services integration.
Field Summary
public static final Api<Api.ApiOptions.NoOptions> | API | Token to pass to
addApi(Api extends Api.ApiOptions.NotRequiredOptions>
) to enable LocationServices. |
public static final FusedLocationProviderApi | FusedLocationApi | This field is deprecated. Use
GoogleApi-based API
FusedLocationProviderClient instead. |
public static final GeofencingApi | GeofencingApi | This field is deprecated. Use
GoogleApi-based API GeofencingClient
instead. |
public static final SettingsApi | SettingsApi | This field is deprecated. Use
GoogleApi-based API SettingsClient
instead. |
Public Method Summary
static FusedLocationProviderClient |
getFusedLocationProviderClient(Activity
activity)
Create a new instance of
FusedLocationProviderClient for use in an Activity .
|
static FusedLocationProviderClient |
getFusedLocationProviderClient(Context
context)
Create a new instance of
FusedLocationProviderClient for use in a non-activity Context .
|
static GeofencingClient |
getGeofencingClient(Activity
activity)
Create a new instance of
GeofencingClient
for use in an Activity .
|
static GeofencingClient |
getGeofencingClient(Context
context)
Create a new instance of
GeofencingClient
for use in a non-activity Context .
|
static SettingsClient |
getSettingsClient(Context
context)
Create a new instance of
SettingsClient
for use in a non-activity Context .
|
static SettingsClient |
getSettingsClient(Activity
activity)
Create a new instance of
SettingsClient
for use in an Activity .
|
Inherited Method Summary
Fields
public static final Api<Api.ApiOptions.NoOptions> API
Token to pass to
addApi(Api extends Api.ApiOptions.NotRequiredOptions>
)
to enable LocationServices.
public static final FusedLocationProviderApi FusedLocationApi
This field is deprecated.
Use GoogleApi-based API FusedLocationProviderClient
instead.
Entry point to the fused location APIs.
public static final GeofencingApi GeofencingApi
This field is deprecated.
Use GoogleApi-based API GeofencingClient
instead.
Entry point to the geofencing APIs.
public static final SettingsApi SettingsApi
This field is deprecated.
Use GoogleApi-based API SettingsClient
instead.
Entry point to the location settings-enabler dialog APIs.
Public Methods
public static FusedLocationProviderClient getFusedLocationProviderClient (Activity activity)
Create a new instance of FusedLocationProviderClient
for use in an Activity
.
Error resolutions will be automatically launched from the provided Activity, displaying
UI when necessary.
public static FusedLocationProviderClient getFusedLocationProviderClient (Context context)
Create a new instance of FusedLocationProviderClient
for use in a non-activity Context
.
Error resolutions will be automatically launched from the provided Context, displaying
system tray notifications when necessary.
public static GeofencingClient getGeofencingClient (Activity activity)
Create a new instance of GeofencingClient
for use in an Activity
.
Error resolutions will be automatically launched from the provided Activity, displaying
UI when necessary.
public static GeofencingClient getGeofencingClient (Context context)
Create a new instance of GeofencingClient
for use in a non-activity Context
.
Error resolutions will be automatically launched from the provided Context, displaying
system tray notifications when necessary.
public static SettingsClient getSettingsClient (Context context)
Create a new instance of SettingsClient
for use in a non-activity Context
.
Error resolutions will be automatically launched from the provided Context, displaying
system tray notifications when necessary.
public static SettingsClient getSettingsClient (Activity activity)
Create a new instance of SettingsClient
for use in an Activity
.
Error resolutions will be automatically launched from the provided Activity, displaying
UI when necessary.