pingplacepicker icon indicating copy to clipboard operation
pingplacepicker copied to clipboard

Search not working

Open NehaEm opened this issue 4 years ago • 2 comments

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.

NehaEm avatar Jun 11 '21 05:06 NehaEm

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)
            }

alizestbrains avatar Jun 16 '21 14:06 alizestbrains

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.

odbol avatar Jul 25 '21 21:07 odbol