Google Places Api Placefilter
I am using Google Places API for Android and am trying to limit the results to only show Restaurants. I have included a PlaceFilter and seems to be correct but doesn't seem to be
Solution 1:
Currently, the only ways to filter the results of getCurrentPlace
are outlined in the PlaceFilter class:
requireOpenNow if true, return only places open now
restrictToPlaceIds the specific PlaceIds to match
Each one of those PlaceIds is supposed to match to a specific location. Unfortunately, it looks like filtering the results of Places.PlaceDetectionApi.getCurrentPlace
by the type of place (eg restaurants) is not supported yet. The Place.TYPE_RESTAURANT
you referenced can be used in AutocompleteFilter for GeoDataApi.getAutocompletePredictions
.
Post a Comment for "Google Places Api Placefilter"