Is it possible to filter google place picker

2.8k views Asked by At

Is it possible to filter the locations google placepicker displays for lets say only supermarkets? Otherwise, how would i best go about creating a view like this?

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

There are 3 answers

0
sidecarcat On BEST ANSWER

This feature is not currently available. You may follow these two open issues for updates:

0
meghan66 On

You will need to add a place type in your place search, grocery_or_supermarket is one of them.

Source: https://developers.google.com/places/supported_types

0
nowavewater On

As far as I know, you can't. I tried extend the PlacePicker class, nothing I can override. Place Picker API looks tentative, hope Google will add this feature in the future.