简体   繁体   English

Google Play服务4.1中的Google Drive Android API

[英]Google Drive Android API in Google Play Services 4.1

I read article about new Google Drive Android API in Google Play Services 4.1. 我在Google Play服务4.1中阅读了有关新的Google Drive Android API的文章 This is already available for download in SDK. 它已经可以在SDK中下载。 But only problem is API description. 但是唯一的问题是API描述。 I found only "old" API description . 我发现只有“旧的” API 描述

I am looking for any information how to implement new "Transparent use and syncing of local storage". 我正在寻找有关如何实施新的“本地存储的透明使用和同步”的信息。

Transparent use and syncing of local storage 透明使用和同步本地存储

The Google Drive Android API temporarily uses a local data store in case the device is not connected to a network. 如果设备未连接到网络,则Google Drive Android API会临时使用本地数据存储。 So, no need to worry about failed API calls in your app because the user is offline or experiencing a network connectivity problem. 因此,无需担心应用程序中的API调用失败,因为用户处于脱机状态或遇到网络连接问题。 Data stored locally in this fashion will automatically and transparently be stored in the Google Drive cloud by Android's sync scheduler when connectivity is available to minimize impact on battery life, bandwidth, and other resources. 当连接可用时,以这种方式本地存储的数据将由Android的同步调度程序自动透明地存储在Google云端硬盘云中,以最大程度地减少对电池寿命,带宽和其他资源的影响。

I have just put some code on GitHub. 我刚刚在GitHub上放了一些代码。
https://github.com/seanpjanson/140201-GDAA If you're on Windows / Eclipse environment, you may benefit from the 'readme.txt' file. https://github.com/seanpjanson/140201-GDAA如果您使用的是Windows / Eclipse环境,则可以从“ readme.txt”文件中受益。

@Michal @Michal
Your description link is correct. 您的描述链接正确。 If you dig deeper you will find full bunch of links from there. 如果您进行更深入的研究,您会发现从那里可以找到完整的链接。

  1. The Github Quickstart has functional code you can use Github快速入门提供了可以使用的功能代码
  2. Github "android-demos" is functional as well and has most of the scenarios covered ( https://github.com/googledrive/android-demos ) Github的“ android-demos”也具有功能,并且涵盖了大多数场景( https://github.com/googledrive/android-demos
  3. reference is here ( https://developer.android.com/reference/com/google/android/gms/drive/package-summary.html ) 参考在这里( https://developer.android.com/reference/com/google/android/gms/drive/package-summary.html

I've been using these resources for a week now and managed to get up-and-running. 我已经使用这些资源一个星期了,并设法正常运行。 There are a few hurdles when setting up the environment in Eclipse (I run WIN 7) and it was a real pain. 在Eclipse(我运行WIN 7)中设置环境时有一些障碍,这确实很痛苦。 I will have a bit more info together in a few days and will publish it. 几天后,我将获得更多信息,并将其发布。

Disclaimer: I am not affiliated with Google, just a poor developer like yourself. 免责声明:我与Google无关,只是像您这样的可怜的开发人员。 Don't shoot :) Hell I'm not even a developer. 不要开枪:)地狱,我什至都不是开发商。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM