last day (14 days later) » 

18:41
7
Q: How to avoid from always loading cached app data from Google Drive

Cheok Yan ChengCurrently, I'm using Google Drive Android API, to store my Android app data, to Google Drive App Folder. This is what I'm doing when saving my application data Generate checksum for current local zip file. Search in Google Drive App Folder, to see whether there is an existing App Folder zip fi...

@StefanHaustein Before Google Play Services, I were using "regular" Java Rest API too. Due to the newly required permission stackoverflow.com/a/34701518/72437 in regular Java Rest API, I decide switch over to Google Drive Android API. Now, I realize such decision does more harm than good.
@StefanHaustein I don't think I want to file a bug report at this moment. As, even when they fix requestSync behavior, the strictly imposed limit (Sync request rate limit exceeded) on requestSync - stackoverflow.com/q/31203255/72437 , make that API not particular useful.
@StefanHaustein I realize you work in Google. Do you know anyone who is working on Google Drive Android API? Not sure you are able to draw his attention on this question. Would like to hear some input from them :)
@StefanHaustein ok. Thanks for the link. I'm in the process of producing a minimal workable example to demonstrate the bug. github.com/yccheok/google-drive-bug I will let you know once it is done. Thank you very much.
@Shailendra I had modified the code by using driveContents.commit request with the metadataChangeset gist.github.com/yccheok/2676fc3383116945ca1fac3bbf5a3b1f The saveToGoogleDrive returns true. Still, same problem occurs if you download -> save -> download again. It still get the cached content. I'm still in the process of producing a minimal workable example to demonstrate the problem.
@Shailendra Helo, I manage to produce a minimal workable example, to demonstrate this problem. Do you mind to take a look? Is there any mistake I had made in the source code, or is this bug in API? Thank you very much.
@StefanHaustein Helo, I manage to produce a minimal workable example, to demonstrate this problem. Do you mind to take a look in it? Thank you very much.
@StefanHaustein I hope I had explained the issues in a clear manner - code.google.com/a/google.com/p/apps-api-issues/issues/&helli‌​p;
What Android version and device are you running? I tested your demo on Nexus 5 6.0.1 MOB30Y and it is absolutely alright. Did you try to run app on other Drive account?
@PoprostuRonin I'm using Nexus 5 6.0.1 MOB30Y too. Are you updated with latest Google Play Services? What if you try to click on "Save 123.." and "Save 456.." alternatively multiple times, before clicking on "LOAD LAST SAVED FILE"? Will you get 123.TXT with content "456" (Or 456.TXT with content "123") ?
@PoprostuRonin May I know, do you only have 1 Google account, or multiple Google accounts in your Nexus 5?
I have Play services version 9.4.52. Here is a video, me trying to reproduce the bug: drive.google.com/open?id=0BwVbx1E4ikgURDhRa2JXX2FQWFU I tried the same without WiFi and even with Restrict background data it didn't break.
I also tried on multiple accounts the bug did not appear.
@PoprostuRonin I'm really appreciate your input. This is how it looks like under my device - youtu.be/kuIHoi4A1c0 I realize, not all users will hit with this problem. For instance, I had tested with another Nexus 6, Google Play Services 9.4.52 (440-127739847). The problem doesn't appear
@PoprostuRonin I had compiled an APK for testing purpose - github.com/yccheok/google-drive-bug/releases/download/1.0/&h‌​ellip;
18:43
Sadly compiled APK still doesn't reproduce a bug. Did try to run this app on account that wasn't tested before?
Yes. When I try to run on Nexus 6 with a new account, the problem doesn't appear.
But, I'm not alone. Time-to-time, there are customers who are reporting the same problem.
Thanks for helping in testing in your Nexus 5. At least now I know, this is quite a tricky problem as it doesn't happen in all devices.
I have a theory. Try to run your app on completely new account, do it slowly (in app).
Trying...
Tested new account in my Nexus 5, still facing the same problem
But, if tested new account in another Nexus 6, thing works fine.
18:59
Then it looks like my theory doesn't make sense.
@PoprostuRonin Thanks any way. Your input is pretty valuable.
I would only suggest to actually see what is on the Drive, change getAppFolder to getRootFolder. Making the file update atomically would also be better.
19:22
thanks for suggestion, and good nite.

last day (14 days later) »