Which Is the best way to use file storage for Android app by Google API? Google Drive sdk or Google cloud Storage API?

懵懂的女人 提交于 2019-12-06 13:15:14

It sounds like either service could be used for your purpose, however I think Google Storage would be a better fit. Drive is better suited for storing user-specific files such as settings, application state, or backup. Uses Google Storage you could access the files securely via a service account that only your app has access to. Google storage also has ACLs so you could add/remove access as needed to each user if you wanted to take that route.

You can access the Storage API by using standard REST protocols however Google has created some great client libs that take the hard work out of it. The client libs are pretty standard across most of there APIs (including new appengine endpoints) so once you learn one service you can easily use one of the others. Below is a link to an example for cloud storage. They are written for appengine and command line so they may need to be some modification and checking the dependencies to make sure you have the android jars.

http://code.google.com/p/google-api-java-client/wiki/APIs#Cloud_Storage_API

Hope this helps.

Google Cloud Storage is a more appropriate service to serve files in "Web" scale. Drive focuses on user data and applications around it. There are several quotas that are fine-tuned for user focused usage, I'd not consider it as an alternative of Google Cloud Storage.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!