Is it possible to filter a Google collection
Is it possible to filter locations on google placepicker displays so that we can only talk about supermarkets? Otherwise, how would I best create such a view?
mGoogleApiClient = new GoogleApiClient
.Builder(this)
.addApi(Places.GEO_DATA_API)
.addApi(Places.PLACE_DETECTION_API)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
int PLACE_PICKER_REQUEST = 1;
PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
try {
Context context = getApplicationContext();
startActivityForResult(builder.build(context), PLACE_PICKER_REQUEST);
}
catch (Exception e) {
}
+3
Alex poley
source
to share
3 answers
This feature is currently not available. You can follow these two open issues for updates:
- Issue 8484: Placement Selection Filter by PlaceType
- Issue 8565: Customizing PlacePicker - Add Place Type Filter to Intent Designer
+5
sidecarcat
source
to share
As far as I know, you cannot. I tried to extend the PlacePicker class, I can't override anything. The Place Picker API seems to be conditional, hopefully Google will add this feature in the future.
+2
nowavewater
source
to share
You will need to add the place type in the place finder, grocery_or_supermarket is one of them.
Source: https://developers.google.com/places/supported_types
-4
meghan66
source
to share