googleworkspace / android-samples

Android samples for Google Workspace APIs
Apache License 2.0
635 stars 410 forks source link

Error on query file in google driver #80

Closed GReaper13 closed 6 years ago

GReaper13 commented 6 years ago

I'm using google driver api for my Android app and have some troubles with it. I'm using query builder to get File by title, then I get count metadata at onSuccessfulListener. I got count = 1 but in my driver has no file with thats title. Sorry about my bad English. Anyone can fix it?

kbboss commented 6 years ago

@GReaper13 how about now?

GReaper13 commented 6 years ago

I have search but get nothing. I guess it is not real time? I add 5 file with the same title, and query, I got 5. Then I delete all of them (also delete them in recycle bin), after that I query but I got 5 :((

kbboss commented 6 years ago

@GReaper13 I found some index about it . https://developers.google.com/drive/android/files#lifecycle_of_a_drive_file

kbboss commented 6 years ago

@GReaper13 how do you get the file‘s thumnail by api?

GReaper13 commented 6 years ago

I am using query build by title. (Query.Builder().addFilter(Filters.eq(SearchableField.TITLE, "title")).build();) Then onSeccessfulListener I get count file by metadata.getCount().

kbboss commented 6 years ago

I am using query build by title. (Query.Builder().addFilter(Filters.eq(SearchableField.TITLE, "title")).build();) Then onSeccessfulListener I get count file by metadata.getCount(). @GReaper13

Yes. you can get the metadata. so ?

GReaper13 commented 6 years ago

That. I log metadata.getCount() for each run. First, my google driver has 1 file with title "title". I run my app and get log: 1. Then, I delete that file in google driver (also delete it in recycler bin), then I run may app again. Log is 1?? why? (both of them have networking)

kbboss commented 6 years ago

@GReaper13 how about the file Metadata : what's the metadata.isTrashed()?

GReaper13 commented 6 years ago

I didn't test it. What will it return?

GReaper13 commented 6 years ago

It return MetadaBuffer, not Metadata, and it doesn't have isTrashed().

erickoledadevrel commented 6 years ago

This issue tracker is for issues related to the sample code. For general Q&A please see the support page: https://developers.google.com/drive/android/support