I have some files in a Google Drive folder created using the Google Web API.
Now I want to list the files and then read the contents.
I am not able to list the files using Android Google Drive APIs using Google's example code:
Task<MetadataBuffer> queryTask = getDriveResourceClient().queryChildren(folder, query);
// END query_children]
queryTask
.addOnSuccessListener(this,
metadataBuffer -> mResultsAdapter.append(metadataBuffer))
.addOnFailureListener(this, e -> {
Log.e(TAG, "Error retrieving files", e);
showMessage(getString(R.string.query_failed));
finish();
});
}
}
I am not sure if this is possible or I am making any mistake.
File Listing results:
-----------------------------
07-29 20:57:50.587 9722-9722/com.shasratech.s_c_31 I/DT-Google-drive: In case GOOGLE_DRIVE_GET_FILE calling findChild
07-29 20:57:50.692 9722-10478/com.shasratech.s_c_31 I/DT-Google-drive: File Title = DT-DBB-29-07-2018 20:57:19.sqlite
07-29 20:57:50.693 9722-10478/com.shasratech.s_c_31 I/DT-Google-drive: File Title = DT-DBB-29-07-2018 20:26:46.sqlite
--------------------------------
where as there is another file created by Web API which is not listed.