UPDATE (May 2015):
the \'trash\' functionality has been implemented in GDAA, making the question below irrelevant.
ORIGINAL QUESTION:
While Google Drive Android API does not yet support delete, you can delete the contents (and, at the same time, rename the title, so that you can ignore it in future). This might be useful to devs using the AppFolder.
private void deleteContents(final DriveFile driveFile) {
driveFile.open(mGoogleApiClient, DriveFile.MODE_WRITE_ONLY, null).setResultCallback(new ResultCallback() {
@Override
public void onResult(DriveContentsResult result) {
if (!result.getStatus().isSuccess()) {
// oh noes!
return;
}
DriveContents contents = result.getDriveContents();
try {
MetadataChangeSet metadataChangeSet = new MetadataChangeSet.Builder().setTitle(DELETED_DRIVE_TITLE).build();
contents.commit(mGoogleApiClient, metadataChangeSet).setResultCallback(
new ResultCallback() {
@Override
public void onResult(Status status) {
if (!status.isSuccess()) {
// more oh noes!
return;
}
// nicely deleted
}
});
}
catch (Exception e) {
contents.discard(mGoogleApiClient);
}
}
});
}