I'm using google Maps in a fragment and on top of it I'm using PlaceAutoComplete fragment. The problem I'm facing is that when I click on the PlaceAutoComplete widget it shows me a error.
Code:
placeAutoComplete.setOnPlaceSelectedListener(new PlaceSelectionListener() {
@Override
public void onPlaceSelected(Place place) {
Log.d("Maps", "Place selected: " + place.getName());
addMarker(place);
}
@Override
public void onError(Status status) {
Toast.makeText(getContext(),"Erro",Toast.LENGTH_SHORT).show();
Log.d("Maps", "An error occurred: " + status);
}
});
Error:
Status{statusCode=ERROR, resolution=null}
New Error:
{"errors":[{"domain":"global","reason":"forbidden","message":"Requests
to this API placesandroid method places.
PlacesService.AutocompleteWidget are blocked."}],"code":403}P