【问题标题】:Adding custom properties using the new Google Play Services drive api使用新的 Google Play 服务驱动 API 添加自定义属性
【发布时间】:2014-05-29 21:44:30
【问题描述】:

我想在我的 Android 应用程序中为文件和文件夹添加自定义属性。我找不到使用新的 Google Play Services Drive API 的任何方法。 API中是否缺少此功能?使用“旧”驱动 SDK,我可以通过以下方式执行此操作:

私有静态属性 insertProperty( 驱动服务,String fileId,String key,String value,String可见性){ 属性 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;

}

我想避免在我的应用中混合使用 Drive SDK 和 Google Play Services Drive API...

【问题讨论】:

    标签: google-play-services google-drive-android-api google-drive-api


    【解决方案1】:

    此时 Android Google Drive API 不支持自定义属性。

    目前只有这些元数据选项可通过 Android Google Drive API 获得:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-04
      • 1970-01-01
      • 2016-05-05
      • 2013-05-12
      相关资源
      最近更新 更多