Google Places API cannot find results

Autocomplete feature about stopped places in Android app. I have below code

AutocompleteFilter typeFilter = new AutocompleteFilter.Builder()
                    .setCountry("GR")
                    .setTypeFilter(AutocompleteFilter.TYPE_FILTER_REGIONS)
                    .build();

Intent intent = new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY)
                            .setFilter(typeFilter)
                            .build(activity);
activity.startActivityForResult(intent, 1009);

    Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
            super.onActivityResult(requestCode, resultCode, data);
               switch (requestCode) {
                    case 1009:
                        if (resultCode == RESULT_OK) {
                            //Do something with Place
                        } else if (resultCode == PlaceAutocomplete.RESULT_ERROR) {
                            Status status = PlaceAutocomplete.getStatus(this, data);
                            Log.i("address status", status.getStatusMessage());
                        }
                        break;

      

But in any "correct" input I pass, it never returns a result. Always get "impossible to find result". The same code he worked with before. Any ideas?

I use: 'com.google.android.gms:play-services-places:10.2.1'

+1


source to share





All Articles