I want to integrate Google drive with my app I have registered my app in Google Developers Console. I got a sample from https://github.com/googledrive/android-demos .By this
first create folder using creatreeTree()
then run a search query to get id of create public static ArrayList
when you get folder id use this code to create folder in folder ` public static ParentReference insertFileIntoFolder(Drive service, String folderId, String folderName) throws IOException {
// Log.e("founffffd",id); File fileMetadata = new File(); fileMetadata.setParents(Collections.singletonList(new ParentReference().setId(folderId == null ? "root" : folderId))); fileMetadata.setTitle(folderName); fileMetadata.setMimeType("application/vnd.google-apps.folder");
File file = mGOOSvc.files().insert(fileMetadata).execute();
System.out.println("Folder ID: " + file.getId());
strChildFolder = file.getId();
return null;
}`