How to get the file ID so I can perform a download of a file from Google Drive API on Android?

后端 未结 7 1237
[愿得一人]
[愿得一人] 2020-12-29 04:37

I am working on an Android project and I am trying to make use of the Google Drive API and I\'ve got most of it working but I am having an issue in how I perform a download.

7条回答
  •  粉色の甜心
    2020-12-29 05:13

    One way is to associating unique properties with your file while creation.

    properties = "{ \
        key='somekey' and \
        value='somevalue'
    }"
    

    then create a query.

    query = "title = " + "\'" + title + "\'" + \
            AND + "mimeType = " + "\'" + mimeType + "\'" + \
            AND + "trashed = false" + \
            AND + "properties has " + properties
    

    All the file properties(title, etc) already known to you can go here + properties.

提交回复
热议问题