Questions tagged [google-drive-realtime-api]

As of November 2017 Google deprecated the Realtime API, and it is unavailable for new projects. It will stop working on December 11th 2018. It provided collaboration as a service for files in Google Drive via the use of operational transforms. The API was a JavaScript library hosted by Google that provided collaborative objects, events, and methods for creating collaborative applications.

The Realtime API lets you, the developer, design a shared data model that looks just like a local, in-memory data model. You write code to manipulate maps, lists, and your own custom JavaScript data model objects. When your code makes a change to the data model on behalf of some user, the data model automatically changes for all the users on the document.

These collaborative data model objects work just like local in-memory data model objects, with one exception. Unlike a local JavaScript data model, a collaborative Realtime API data model may change as a result of edits that were made by someone other than the current user. As a result, applications need to attach listeners to a collaborative document so that the UI may be updated to reflect remote changes.

The Realtime API is based on the same collaboration technology used by Google Docs. Whenever a collaborative data model is modified, the change is applied immediately to the local, in-memory copy of the document. The API then silently sends a representation of the change to the server (called a "mutation") so that the change can be recorded in the document and communicated to other collaborators. The mutations have been carefully designed so that conflicts between collaborators can always be automatically resolved, so users will never have to see a message about edit conflicts.

Realtime data models are "eventually consistent." That means that if all collaborators stop editing, eventually everyone will see the same data model. However, we make no guarantees about when all the collaborators will see the changes or what order the changes will be delivered in.

See https://developers.google.com/drive/realtime

520 questions
3
votes
0 answers

Google Realtime API (or its functionality) for Android?

Some questions have asked this already: Is Google Drive RealTime API for Android?, and Does the Google Drive realtime API support Android? However, it was described by one commenter two years ago as a "high priority" for Google, and I know that the…
3
votes
1 answer

Delete row from Google Sheet

I am building a web app that interfaces with a Google Sheets spreadsheet. I can successfully read data by consuming the JSON formatted version of the sheet. I can successfully create new rows by posting to the /formResponse associated with the…
eat-sleep-code
  • 4,753
  • 13
  • 52
  • 98
3
votes
1 answer

How to implement collaborative rich text editing with Google Drive Realtime API?

I'm developing a web application which uses the Google Drive Realtime API. The API is used to store the document's data and to synchronize all modifications between the active collaborators. Now I want to add support for text boxes with rich text…
3
votes
1 answer

How do I upload a large powerpoint file to google drive?

I am trying to upload a large power point file to google drive using the PHP API. When I use the code below, the file uploads, but appears to be garbage when I open it through the google drive interface. Anybody know what I need to change? $file…
3
votes
0 answers

Google Drive API throws numerous 500 errors since 4/29/2014

We use the Google Drive API to integrate spreadsheets with our app and it appears since 4/29 our drive account has changed and we are getting many 500 errors with POSTs/PUTs/GETs throughout the day. These would happen very infrequently before. We…
3
votes
3 answers

I need a script to monitor a specific Google Drive folder whenever there is a change and notify me by email

I have been trying all day and I found this: http://www.jellybend.com/2012/12/19/monitor-google-drive-folders-with-google-apps-script/ The attached script worked only partially for me. It doesn't respond to change to the subfolders even there are…
3
votes
2 answers

Google drive is not allowing me to access all document and files in iOS

I am making an iphone app and there i need to integrate Google drive api. When i have integrated that into the app then it is only showing the files which i have created from "APP" but i just need all docuemnts and files from google drive to my…
Himanshu Parashar
  • 478
  • 1
  • 6
  • 18
3
votes
0 answers

Google Drive Realtime API OAuth2 Refresh Errors (Part 3)

I'm having some issues with the realtime API reconnecting properly after a laptop/phone comes back from sleep/standby. The API properly detects that it needs to have a refresh OAuth token and throws an error, however once the token has been…
3
votes
0 answers

Creating realtime document for a folder

I'd like to create a realtime model holding the name, description and some other properties for a drive folder. When I try to create the realtime document with the folder id I get a "Bad request". Is creating realtime models for folders supported?
dflorey
  • 1,828
  • 3
  • 19
  • 31
3
votes
0 answers

ObjectChanged Event not Bubbling for ValuesAdded/ValuesRemoved

I am trying to reduce the number of event listeners attached to my collaborative models. In order to do this, I have started listening to the ObjectChanged event instead of specific event types and delegating to other handlers. However it doesn't…
Grant Watters
  • 660
  • 4
  • 16
3
votes
1 answer

Javascript error - log:Net state changed from BUSY to CLIENT_ERROR

There is a log entry saying that there is an error on client side, however, the errors are not shown in Firebug. Where can I see error details?
dev.e.loper
  • 35,446
  • 76
  • 161
  • 247
3
votes
3 answers

Opening specific MimeTypes with google picker

I am working with realtime API and I am making use of realtime-client-utils. Using existing code, I am creating realtime files with this method: createRealtimeFile = function(title, callback) { gapi.client.load('drive', 'v2', function() { …
Giannis
  • 5,286
  • 15
  • 58
  • 113
3
votes
1 answer

Enable 'Open FIle" from Google Drive API - RealTime API

Following the Realtime-Playground example, I am trying to enable "open file" in my application. Authorization works correct, and an empty file is created on gDrive. Although the code for creating a popup for file selection is not working. The…
Giannis
  • 5,286
  • 15
  • 58
  • 113
3
votes
2 answers

How to handle Uncaught java.lang.IllegalStateException: Initial revision has already been set?

When my Realtime API based app is experiencing heavy usage new users have a hard time loading the data model. In this scenario users see the follow error in their console: Uncaught java.lang.IllegalStateException: Initial revision has already been…
3
votes
3 answers

How to get file owners e-mail address Google Drive API

So when I retrieve a file via the Google Drive API, I see that there is an attribute called 'owners'. This is an array of owners, with values for kind, displayName, picture, isAuthenticatedUser, and permissionId. From this information, is it…
user1538393
  • 33
  • 1
  • 7