title: Google places getPlaceID returns non null array yet filter returns zero results
body: <p>I have successfully implemented Google places into my application. I am now trying to filter the results, here is my array of results.</p>
  
  <pre><code>PendingResult&lt;PlaceLikelihoodBuffer&gt; result = Places.PlaceDetectionApi.getCurrentPlace(googleApiClient, null);
  </code></pre>
  
  <p>The 2nd param for <code>getCurrentPlace</code> is the filter option. I've used <code>null</code> however, I have no idea how to add filters to the results. I've looked at <a href="https://developers.google.com/places/supported_types" rel="nofollow">place types</a>. </p>
  
  <p>As I have a library nearby I've tried this:</p>
  
  <pre><code>PendingResult&lt;PlaceLikelihoodBuffer&gt; result = Places.PlaceDetectionApi.getCurrentPlace(googleApiClient, Place.TYPE_LIBRARY);
  </code></pre>
  
  <p>However, I'm getting the error </p>
  
  <blockquote>
    <p>Error:(98, 118) error: incompatible types: int cannot be converted to PlaceFilter</p>
  </blockquote>
  
  <p>I have looked at some Stackoverflow posts, but they are quite old so I don't know if they hold true anymore. All of them say that filters are not fully implemented in google places yet. Is this still the case? if not, could someone please help</p>
  
  <p>Thanks</p>
  
  <p><strong>Update 1:</strong></p>
  
  <p>So i found <a href="https://developers.google.com/android/reference/com/google/android/gms/location/places/Place#top_of_page" rel="nofollow">this link</a> to find placeIDs for each type:
  Just for testing I did this (basically it should print all locations in my textbox again like if it was null):</p>
  
  <pre><code>ArrayList&lt;String&gt; filter = new ArrayList&lt;&gt;();
      for (int i =0; i&lt; 5000; i++){
          filter.add(String.valueOf(i));
      }
  
      PlaceFilter filterClosed = new PlaceFilter(false, filter);
  </code></pre>
  
  <p>and then applied it:</p>
  
  <pre><code>PendingResult&lt;PlaceLikelihoodBuffer&gt; result = Places.PlaceDetectionApi.getCurrentPlace(googleApiClient, filterClosed);
  </code></pre>
  
  <p>Yet I get no locations in the textbox anymore, I font receive any location information. Any idea why?</p>
  
  <p><strong>Update 2</strong>
  Working with the information you provided in your comment, I got the placeIDs using getID method, please refer to the screenshot I uploaded in my comment (stackoverflow is not allowing me to upload anymore links). So its giving me IDs why does it return nothing when I apply the filters to the result? can anyone else give this a try please? here is my code:</p>
  
  <pre><code>PlaceFilter filterClosed = null;
      ArrayList&lt;String&gt; filter = new ArrayList&lt;&gt;();
      for (int i =0; i &lt; 45; i++){
          filter.add(String.valueOf(i));
      }
      filterClosed = new PlaceFilter(false, filter);
      txtLocation.setText(String.valueOf(filterClosed.getPlaceIds()));
  
  
  
      PendingResult&lt;PlaceLikelihoodBuffer&gt; result = Places.PlaceDetectionApi.getCurrentPlace(googleApiClient, filterClosed);
  </code></pre>
  
  <p>I do not understand how to use the places matches bool val</p>