getPlaceDetectionClient(android.app.Activity, com.google.android.gms.location.places.PlacesOptions) is deprecated

Viewed 1040

Android Studio 3.1.4

placeDetectionClient = Places.getPlaceDetectionClient(this, null);

gave error:

getPlaceDetectionClient(android.app.Activity, com.google.android.gms.location.places.PlacesOptions) is deprecated

Any idea use what instead? Thank you

1 Answers

Did you read the API reference?

getPlaceDetectionClient(Context context, PlacesOptions options) has been replaced with getPlaceDetectionClient(Context context). Just remove the null parameter.

That's also not an error. It's a warning and is safe to ignore for debugging purposes.

Related