getPlaceDetectionClient(android.app.Activity, com.google.android.gms.location.places.PlacesOptions) is deprecated
getPlaceDetectionClient(android.app.Activity, com.google.android.gms.location.places.PlacesOptions) is deprecated
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 Answer
1
Did you read the API reference?
getPlaceDetectionClient(Context context, PlacesOptions options)
has been replaced with getPlaceDetectionClient(Context context)
. Just remove the null
parameter.
getPlaceDetectionClient(Context context, PlacesOptions options)
getPlaceDetectionClient(Context context)
null
That's also not an error. It's a warning and is safe to ignore for debugging purposes.
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Thanks, simple but effective.
– Records
Jan 3 at 10:33