title: How do I work with DriveApi.MetadataBufferResult?
body: <p>I'm using the Drive API and am starting to get very frustrated. I'm trying to use queries to search for files/folders based on their name. This demo has a good example on how to do this: <a href="https://github.com/googledrive/android-demos/blob/master/src/com/google/android/gms/drive/sample/demo/QueryFilesWithAInTitleActivity.java" rel="nofollow">https://github.com/googledrive/android-demos/blob/master/src/com/google/android/gms/drive/sample/demo/QueryFilesWithAInTitleActivity.java</a></p>
  
  <p>But I don't want to add the data to a ListView, I just want to extract information from the MetadataBufferResult directly (titles, and IDs so I can work with them). But every example I've looked at only does this ListView thing, and I haven't been able to find a way to extract any information from the MetadataBufferResult or find good documentation on it.</p>
  
  <p>Basically I want to be able to do this (code taken from the demo linked above):</p>
  
  <pre><code>final private ResultCallback&lt;DriveApi.MetadataBufferResult&gt; metadataCallback =
              new ResultCallback&lt;DriveApi.MetadataBufferResult&gt;() {
                  @Override
                  public void onResult(DriveApi.MetadataBufferResult result) {
                      if (!result.getStatus().isSuccess()) {
                          showMessage("Problem while retrieving results");
                          return;
                      }
  
                      //I haven't been able to find a way to do this
                      result.getDriveID();
                      result.getFileTitle();
                  }
              };
  </code></pre>
  
  <p>Short version: I want to search the root directory of someone's Drive account for the file with the title "x" and then read/write to this file. My problem is that I can't extract data from the MetadataBufferResult object I'm passed and all the examples I've seen output it using a ListView which I don't want to do.</p>