0

I would like to add custom properties to files and folders from within my Android application. I cannot find any way to do this using the new Google Play Services Drive API. Is this missing from the API? Using the "old" Drive SDK I could do this in the following way:

private static Property insertProperty( Drive service, String fileId, String key, String value, String visibility) { Property newProperty = new Property();

newProperty.setKey(key);
newProperty.setValue(value);
newProperty.setVisibility(visibility);
try {
  return service.properties().insert(fileId, newProperty).execute();
} catch (IOException e) {
  System.out.println("An error occurred: " + e);
}
return null;

}

I would like to avoid mixing the Drive SDK and the Google Play Services Drive API in my app...

Peter
  • 10,910
  • 3
  • 35
  • 68

1 Answers1

0

At this point the Android Google Drive API does not support custom properties.

Currently these are the only metadata options available through the Android Google Drive API:

https://developer.android.com/reference/com/google/android/gms/drive/MetadataChangeSet.Builder.html

Arthur Thompson
  • 9,087
  • 4
  • 29
  • 33