rtchagas / pingplacepicker

An almost plug and play replacement for Google's Place Picker
Apache License 2.0
142 stars 55 forks source link

Search result unavailable #73

Closed ghiyatshanif closed 4 years ago

ghiyatshanif commented 4 years ago

First of all, This is an awesome replacement of the original PlacePicker library, however I found some trouble using your library. most of the times the search location feature are not showing any result when i insert a long query. but sometimes it show some result when i only insert one or two letters on the search bar. this is what I meant:

Cant load search result: Cant load search result:

Search result loaded

also, I am unable to search for specific location with the search bar.

this is how I implement your library:

private fun showPlacePicker() {
        val builder = PingPlacePicker.IntentBuilder()
        builder.setAndroidApiKey(getString(string.android_api_key))
            .setMapsApiKey(getString(string.maps_api_key))

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

on the manifest :

<meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/android_api_key" />

and this is my API key configuration : Map Api Key : image

Android Api key : image

Am I missing something here? thanks in advance @rtchagas !

rtchagas commented 4 years ago

Hello @ghiyatshanif

The only thing that I could notice is that you're restricting your Android API more than you should.

You should restrict it only by Android applications and set the SHA1s that you might need.

You should not restrict it by APIs.

ghiyatshanif commented 4 years ago

i've already adjusted the credentials settings as per your suggestion but it doesn't affect anything, this is a dumb question but, do we need to set up the billing first? I dont really understand their pricing mechanism these days. @rtchagas

rtchagas commented 4 years ago

Hello!

Yes, according to Google, you do need to setup billing first.

The model is pay as you go. You can check the prices at the README of the library.

Stay safe,

On Tue, Jun 23, 2020, 19:15 Ghiyats Hanif notifications@github.com wrote:

i've already adjusted the credentials settings as per your suggestion but it doesn't affect anything, this is a dumb question but, do we need to set up the billing first, I dont really understand their pricing mechanism these days?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/rtchagas/pingplacepicker/issues/73#issuecomment-648298555, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN3PKPCPSY4FZWYAGT2R2TRYDPK7ANCNFSM4NBITFZQ .