Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search not working #86

Open
NehaEm opened this issue Jun 11, 2021 · 2 comments
Open

Search not working #86

NehaEm opened this issue Jun 11, 2021 · 2 comments

Comments

@NehaEm
Copy link

NehaEm commented Jun 11, 2021

Hi,

I am unable to search the places. I have correctly configured the Android & Map API keys. Whenever I type something in the search box, the search dialog disappears.

Please help me out since I am facing issue in the live app.

Thanks.

@alizestbrains
Copy link

In Application class use this below code:

Places.initialize(applicationContext, "your api key")

In Activity class:

val builder = PingPlacePicker.IntentBuilder()
            builder.setAndroidApiKey(getStr(R.string.google_maps_key))
                .setMapsApiKey(getStr(R.string.google_maps_key))

            try {
                val placeIntent = builder.build(this)
                startActivityForResult(placeIntent, 1001)
            }
            catch (ex: Exception) {
                ShowToast("Google Play Services is not Available", this)
            }

@odbol
Copy link

odbol commented Jul 25, 2021

For me, I had to add the Places API to my Android app key, not just the Maps API key like it says in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants