0

I'd like to solicit an expert advice on the following problem:

I have thousands of files (jpeg images) created under different authorizations in Google Drive. I can see all of them using the RESTful API (DRIVE scope) and can easily collect the file IDs of the subset I need. This collection has to be ported (make visible) to the new app version under the GDAA. And I know that GDAA's 'resource ID' is the RESTful's 'file ID'. I can sure bring all of the files to the Android device (using RESTful API) and re-insert them into the GDAA, but it is wasteful.

So, the question finally emerges:

Having collection of 'resource IDs', is there an easy way to port these files into the GDAA that has FILES scope and its own new authorization identity? Using the Android app only?

seanpj
  • 6,735
  • 2
  • 33
  • 54
  • Actually, it seems to be a simpler problem, of changing the file 'ownership' from broader DRIVE to current app's FILE scope. Not much to do with GDAA. – seanpj Jun 19 '14 at 13:32

1 Answers1

1

If I understand what you are asking, you want to transfer an authorization from one app to another? That is not possible. A user authorized you to access the file with a particular app. They need to reauthorize you to access the file with any new app.

Cheryl Simon
  • 46,552
  • 15
  • 93
  • 82
  • Basically, the files were collected (years before GDAA) to a tree structure on the Drive. Coming from Picasa, some uploaded through Drive Web app, some from other Android apps. They have one single owner (xxx@gmail.com). So I can list (and work with them) them using RESTFul DRIVE scope. But the GDAA Android app with FILE scope see only the subset it created. – seanpj Jun 19 '14 at 14:59
  • I've just tried to run 'patch', didn't work. The point is, with RESTful and its DRIVE scope, I could work with files no matter where they came from. But if I want to switch to GDAA, I have to pull that set from the Drive to the Android device and then re-create the files through GDAA if I ever want to go GDAA/FILES scope exclusively. On the other hand, I see the advantage of seeing only files 'under my jurisdiction". – seanpj Jun 19 '14 at 15:47
  • You can use File scope with the RESTful API also. There is nothing Android specific about it. If you have an web app and an Android app that share the same dev console entry, they will both have access to any authorized files. File scope is a compromise for app development compared to full Drive scope, but users have indicated they greatly prefer it since it gives them more control over who sees their data. – Cheryl Simon Jun 19 '14 at 16:25
  • So, I did it. Wrote a simple routine pulling all (2K of) images from the Drive to the Android (under REST DRIVE scope) device and reinserted them back into the Drive using GDAA. What may be interesting to you is, that Google Play Svcs died on me twice. First time after about 1000 files, and I managed to send crash report. The Services restarted during that, and continued, missing a few files in the process. Then the app loop died completely (not returning from .await()) I could see some cached files going up for another hour, but it never recovered. to be continued... – seanpj Jun 20 '14 at 22:38
  • ... the second time, it was after about 500 files, pretty much the same scene, just the Google Play Services' DOD (Dialog of Death) did not ask for a crash report. Just FYI – seanpj Jun 20 '14 at 22:42