PlacePicker.getPlace() is deprecated
Asked Answered
S

1

22

I'm trying to develop an application based on google place API. When I try to use

Place place=PlacePicker.getPlace(data,this);

there is an error showing getPlace() is deprecated. Please suggest a solution. Thanks in advance!

Soubise answered 5/5, 2016 at 8:45 Comment(1)
Google is tracking the interest in having a Place Picker widget here: (Android) issuetracker.google.com/128304810, (iOS) issuetracker.google.com/128304760. Please fill the linked form with your use case and needs if you are interested.Astylar
U
46

The documentation states

This method is deprecated.
Use getPlace(Context, Intent) instead.

You should find this information in Android Studio as well.

Unkennel answered 5/5, 2016 at 8:48 Comment(6)
For those who didn't realise (like me), the Context and the Intent have been switched, so if you have a deprecation warning, switch the variables over.Attire
why didn't they just change the implementation of the original function with the same parameters order in later releases ?!Morlee
@Unkennel how to "find this information in Android Studio", when I click 'more' on the hint, it just say the current is deprecated, that's it, no solution.Jeweller
@Unkennel the javadoc on android studio says nothing dropbox.com/s/ski1w4myqxfsbd5/… I am using java, or it is just available in Kotlin. I wonder because every time facing a deprecated method, I have to search on the doc from the internet. I would be great if I can found directly in AS. ThanksJeweller
@Jeweller it looks like you don't have the JavaDoc available. It's not related to Kotlin or Java. Maybe Google doesn't provide the docs. Maybe you're using a different repository. But since you have a clear question which is unrelated to this one here, you should consider asking it separately. You'll find more input like this.Unkennel
@Unkennel if possible, please capture your screenshot, otherwise that's fine. Thanks anyway. I will post question then. :)Jeweller

© 2022 - 2024 — McMap. All rights reserved.