0

i am using this code to retrieve the list of files and folders on Android, this returns only one file :(

  {
    Query query = new Query.Builder().setPageToken(mNextPageToken).build();
    Drive.DriveApi.query(getGoogleApiClient(), query).setResultCallback(
                metadataBufferCallback);

   }

    private final ResultCallback<MetadataBufferResult> metadataBufferCallback = new ResultCallback<MetadataBufferResult>() {
            @Override
            public void onResult(MetadataBufferResult result) {
                if (!result.getStatus().isSuccess()) {
                    showMessage("Problem while retrieving files");
                    return;
                }
                mResultsAdapter.append(result.getMetadataBuffer());
                mNextPageToken = result.getMetadataBuffer().getNextPageToken();

            }
        };

1 Answers1

0

The Android API uses Drive.File scope, which gives your app access to the specific files created by it or explicitly opened with it by the user. The query will return the subset of files you have access to that match the query.

Cheryl Simon
  • 46,552
  • 15
  • 93
  • 82