为Android驱动的API是坏了吧? [英] Drive API for Android is broken, right?

查看:249
本文介绍了为Android驱动的API是坏了吧?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

截至2015年8月,在驱动器API为Android不是充当(松松)记录,有效地打破。主要痛点如下:

As at August 2015, the 'Drive API for Android' is not functioning as (loosely)documented, is effectively broken. The main sore points are as follows:

1)应用程序共享相同的APP_ID并记录在与同谷歌用户是的为了能够的发现并访问同一个文件的如谷歌表示(例如APPX Device1上创建了一个名为blahblah(其中不'blahblah'文件夹已经存在于用户的驱动器)文件夹, APPX对设备2应该能够找到该文件夹​​,并从它也上传/下载文件......然而,这是不是这种情况(或者如果它不工作,这是间歇性的,主要是不工作的))。这甚至后(多)requestSync电话,让驱动器本身同步过72小时仍然如此。

1) An app sharing the same APP_ID and logged in with the same Google User is meant to be able to find and access the same files as Google indicate (e.g. appX on device1 creates a folder named 'blahblah' (where no 'blahblah' folder already exists in the User's Drive), appX on device2 should be able to find that folder and upload/download files from it also...however this is not the case (or if it does work, it is intermittent and mostly not working at all)). This remains the case even after (many) requestSync calls and over 72hours of allowing Drive to sync itself.

2)的已删除文件夹没有观察到丢弃,一个电话requestSync成功后还是一样。这种丢弃文件夹仍然会有isTrashed ==假的。

2) A trashed folder is not observed as trashed, even after a requestSync call has succeeded. Such a trashed folder will still have isTrashed==false.

3)永久丢弃的文件夹(即,它是由驱动器走了,就再也不会回来)。我们仍然可以找到和成功有文件夹,并在其中创建的文件,但写这样一个文件的内容将总是产生一个失败的完成事件服务。同样,这样的文件夹仍然isTrashed ==假的(这是非常糟糕)。

3) A permanently trashed folder (i.e. it is GONE from Drive, it is never coming back). Can still be found and "successfully" have folders and files created within it, however writing to such a file's contents will always yield a failure in Completion Event Service. Again, such a folder will still have isTrashed==false (which is abysmal).

错误报告已经通过提出(感谢@DalmTo的链接):<一href=\"https://$c$c.google.com/a/google.com/p/apps-api-issues/issues/entry?labels=Type-Defect,API-Drive\" rel=\"nofollow\">https://$c$c.google.com/a/google.com/p/apps-api-issues/issues/entry?labels=Type-Defect,API-Drive

Bug reports have been lodged (thanks to @DalmTo for the link) via: https://code.google.com/a/google.com/p/apps-api-issues/issues/entry?labels=Type-Defect,API-Drive

HTTPS :?//$c$c.google.com/a/google.com/p/apps-api-issues/issues/detail ID = 4003
https://开头code.google.com / A / google.com / p /应用-API的问题/问题/细节?ID = 4004

所以,问题:知道解决这些问题的方法。

SO, the question: know a way around these issues?

更新:

我已经收窄这些问题到我个人的谷歌帐户(或我个人的驱动器,它在它很多很多文件)。这表明,这些问题的症状或密切相关的 HTTPS://$c$c.google.com/a/google.com/p/apps-api-issues/issues/detail ID = 3905

I've narrowed these problems down to my personal Google account (or my personal Drive, which has many, many files in it). That suggests these issues are symptoms of or closely related to https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3905

推荐答案

我可以给你关于1 /(上运行相同的应用程序多个设备同步)问题的一些意见。我已经指出这个已在<一个href=\"http://stackoverflow.com/questions/23073474/google-drive-android-api-changeevent-listener-workings\">April 2014 没有满意的答案(实际上响亮的沉默)。所以,我切换回 REST API 并处理自己的一切(使用syncadapter,服务,...)。其余的算法是:

I can give you some points regarding the issue 1/ (syncing on multiple devices running the same app). I've been pointing out this already in April 2014 without satisfactory answer (actually resounding silence). So I switched back to the REST API and handled everything myself (using syncadapter, service, ...). The REST's algorithm is:


  1. 创建/更新/删除/ ....(execute()方法)

  2. 调度资源ID使用GCM到其他设备('身份证'+消息)

  3. 让其他设备处理通过REST API的变化(再次,在服务)

我已经重新访问,因为 GDAA 几次,从来没有得到令人满意结果(requestSync)。最后,我得到了中途开心的时候开始使用'<一个href=\"http://stackoverflow.com/questions/22874657/un$p$pdictable-result-of-driveid-getresourceid-in-google-drive-android-api/31553269#31553269\">completion 的事件(一年后,不用说了)。

I've re-visited the GDAA a few times since and never got satisfactory results (requestSync). Finally, I got half-way happy when started to use 'completion events' (a year later, needless to say).

同样的算法中是:


  1. 创建....

  2. GET RESOURCEID从完成

  3. 使用GCM到其它设备发送RESOURCEID'+信息

  4. 让其他设备处理通过GDAA改变(使用RESOURCEID)

...和观点是:结果
在我试图使其工作的时候,我终于明白了GDAA的不是适合所有的应用程序的(就像一个我们这里讨论)。该GDAA经过各种箍和循环,使在线/离线状态透明,同时缓存数据和优化网络流量,使用电池,......它创造的延迟,取消predictable状态...

... and the point is:
During the time I was trying to make it work, I finally realized that the GDAA is not well suited for all applications (like the one we're discussing here). The GDAA goes through all kinds of hoops and loops to make the online/offline state transparent and at the same time to cache data and optimize network traffic, battery use, ... It creates latency, unpredictable states...

...所以,在我停止指责为GDAA不属瑞士小刀,并尽一切大家都曾经梦想过了终点。它是由开发人员充分了解他/她正在使用工具箱的优点/缺点,并决定先期要使用的工具。我知道,文档不拼了,相信我,我自己碰上马格努斯的兴奋。我还记得<一个href=\"http://stackoverflow.com/questions/21369573/trash-delete-in-new-google-drive-android-api\">pinoyyid's在2014年1月警告,告诉我不要太早跳。

... so, in the end I stopped blaming the GDAA for not being a swiss-knife and do everything everybody ever dreamed up. It is up to the developer to FULLY understand the advantages / drawbacks of a toolbox he/she is using and decide upfront which tool to use. I know, the docs do not spell it out and believe me, I myself got caught in Magnus's excitement. I still remember pinoyyid's warning in January 2014, telling me not to jump in too early.

好运

这篇关于为Android驱动的API是坏了吧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆