1

In the quickstart demo, a shortcut file is created in Google Drive. I figure that this shortcut file facilitates the transfer of messages somehow. Can someone explain where this shortcut file points to and it's purpose in Realtime collaboration flow?

dev.e.loper
  • 35,446
  • 76
  • 161
  • 247

1 Answers1

1

The shortcut file is the "file" object that shows up in the user's drive. It has a pointer to the realtime data model. It doesn't actually do much, its just the place where basic information like title, share settings, etc are saved.

You need some file object that can hold this information. If you have separate file content that you want to associate a realtime data model with, you can use that instead. Otherwise, you use a shortcut file.

See these pages for some more info on the choice: https://developers.google.com/drive/realtime/application#step_4_create_or_fetch_a_google_drive_file https://developers.google.com/drive/realtime/models-files

Cheryl Simon
  • 46,552
  • 15
  • 93
  • 82
  • Does this mean that users of my app must have Google Drive account and give access to that account so that my app can create a shortcut file? I was hoping that if I do need to connect and create files on Google Drive, it would be just with my app using service account. – dev.e.loper Jul 12 '13 at 19:30
  • When I'm referring to 'my app' I'm talking about web application that saves data as XML document to a database. – dev.e.loper Jul 12 '13 at 19:43
  • Yes, users must have a Google Drive account and have your app installed in order to access realtime files created by your app. You don't necessarily need to store the files in their drive, but they need to be stored in some account's drive. – Cheryl Simon Jul 12 '13 at 19:47
  • I see. By "installing the app" you mean, they go through authorization process described here - https://developers.google.com/drive/realtime/application#step_3_authorize_access – dev.e.loper Jul 12 '13 at 19:55
  • Yes, its sort of an "install" since once they authorize the scopes first time, its remembered until they revoke access. – Cheryl Simon Jul 12 '13 at 20:01
  • So I can store user's shortcut files in my application's Google Drive account? – dev.e.loper Jul 12 '13 at 20:17
  • Yes, users can access files stored in another account if you share it with them. – Cheryl Simon Jul 12 '13 at 20:54
  • 1
    One more follow up, I decided to make it a separate question. http://stackoverflow.com/questions/17624050/google-realtime-api-share-settings-on-shortcut-file – dev.e.loper Jul 12 '13 at 21:11