0

I have added the PlaceAutocompleteFragment in this way -

PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)
            getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);
    autocompleteFragment.setHint("");
    autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {
        @Override
        public void onPlaceSelected(Place place) {
            Log.i("TAG", "Place: " + place.getLatLng());
        }

        @Override
        public void onError(Status status) {
            Log.i("TAG", "An error occurred: " + status);
        }
    });

Also added in the dependency

compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'

And in the manifest

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

Now when I am clicking on the search icon I nothing is opening not getting any error in log also. I am not sure what is the thing I am doing wrong.

A J
  • 4,542
  • 5
  • 50
  • 80

0 Answers0