1

I am using this code for search a folder

Query query = new Query.Builder().addFilter(Filters.eq(SearchableField.TITLE, MainActivity.FOLDER_NAME)).build();
Drive.DriveApi.query(mGoogleApiClient, query).setResultCallback(metadata);

and on

final ResultCallback<MetadataBufferResult> metadata = new ResultCallback<MetadataBufferResult>() {
        @Override
        public void onResult(MetadataBufferResult result) {
            if (result.getStatus().isSuccess()) {
                if (result.getMetadataBuffer().getCount() == 0) {
                ….
            }

result.getMetadataBuffer().getCount() return me 8.

When from telephone(with Drive App) I removed everyone folders whose name was MainActivity.FOLDER_NAME

What’s wrong ??

Thanks

racso
  • 11
  • 1

1 Answers1

0

I believe, you've run into the pitfall reported in SO 21369573, and discussed as a Github issue here. You are seeing trashed/deleted files/folders LONG AFTER they have been deleted by other apps (like Web Drive...). And there is no 'trash/delete' function in the GDAA at the moment. The issue has been around since the introduction of the GDAA (4 months now). I had to resort to manually rename the files/folders in Google drive before manually deleting them in my test environment to be able to debug stuff.

Does any of the Google development team / support members care to comment? The page says "Ask a Question about the Google Drive SDK".

Community
  • 1
  • 1
seanpj
  • 6,735
  • 2
  • 33
  • 54