I am using android-demos for implementing Google Drive integration in android. I successfully created a file in google drive. Now i want to delete that newly created file. I found the reference for this through https://developers.google.com/drive/v2/reference/files/delete Now files() method in this link is not found in Drive.
private static void deleteFile(Drive service, String fileId) {
try {
service.files().delete(fileId).execute();
} catch (IOException e) {
System.out.println("An error occurred: " + e);
}
}
Now please tell me how to delete file from Google Drive. I did research on this but found no solution. Some says use previous api of Google Drive. But that is obsolete now. Now Goole uses V2 for Drive.