1

Autocomplete feature about places stopped working in my android app. I have the 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 'valid' input I pass it never returns a result. Always get "can't found result". The same code it worked perfect before. Any ideas?

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

Cătălin Florescu
  • 5,012
  • 1
  • 25
  • 36
Christos Thb
  • 27
  • 1
  • 12
  • 1
    Mine is working now. They really should have something like this (https://status.cloud.google.com/) for all their APIs where there is a place you can report possible downtimes as well as review current status. – napkinsterror May 24 '17 at 19:42
  • Yeah! And mine also working now...weird Maybe you have right @napkinsterror – Christos Thb May 24 '17 at 21:35

1 Answers1

0

I solved this issue by regenerating the key.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574