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
1
vote
1 answer

Google Drive API cross-origin frame error

I'm following the documentation here to run the sample javascript app. I set my clientId and upload the two files to my server, but when I go to the index.html page I get this error in my developer tools console: Error in event handler for…
skunkwerk
  • 2,920
  • 2
  • 37
  • 55
1
vote
1 answer

Drive JS API Realtime sample example is not behaving as expected

Well i have just tried the sample example of real time js Google drive api. As they said in their tutorial,the application's text areas will be synced even if they are opened in different browser windows. But here the application is not doing that.…
ssakash
  • 640
  • 8
  • 23
1
vote
1 answer

Realtime API Java suport and examples

I'm trying to use realtime api in java. I have found many examples in javascript but none in java. Is java supported and if not how i'm i going to implement my java app using the functionality of real time api? I have searched allover the drive api…
Adam
  • 91
  • 3
  • 5
1
vote
0 answers

Drive realtime api with path

In the Google Developer Console, for the authorized javascript origins, I can't enter a path. I'm using the example for collaborative text editing at https://developers.google.com/drive/realtime/realtime-quickstart#step_2_set_up_the_sample, and it…
rasen58
  • 4,672
  • 8
  • 39
  • 74
1
vote
0 answers

How to programmatically get edit permission to realtime api file

I am unable to give a user, programmatically, permission to edit a file that uses realtime API. I can however go to the docs.google.com and share that file with that user and in that case we can collaborate normally. The difference between when I…
1
vote
1 answer

upload file to google drive using php web service

i am using google drive file upload code. The following code runs correct in browser. But if i try to do it we error as : fgets() expects parameter 1 to be resource, string given I have tried many solution but its not working. Please guide me how to…
1
vote
1 answer

How to get the orphan folders of Google Drive using Drive APIs?

FilesResource.ListRequest list = DriveService.Files.List(); list.Q = "mimeType = 'application/vnd.google-apps.folder' and trashed = false"; list.MaxResults = 500; FileList folders = list.Fetch(); Above piece of code returns all folders…
Jeevan
  • 167
  • 2
  • 11
1
vote
0 answers

Cannot communicate with Google Server from an android app in HTC one device

When I am trying Google Login and after that getting the AuthToken for accessing Google Drive in HTC one the following code would not allow to access any of the Google accounts. Even if we already had looged in, the following code…
1
vote
1 answer

Permanent link to an audio file (googleDrive)

I'm developing a player for playing audio from the "cloud." Having question, if it is possible to obtain permanent link to an audio file to play without regular re-authorization (googleDrive)?
1
vote
1 answer

Setup a project and application for Google Drive

In the instructions for enabling the drive API, I can't seem to find the options in step 4 and 5: In the sidebar on the left, select Registered apps. Select an application. Any ideas?
EmilyJ
  • 872
  • 2
  • 8
  • 19
1
vote
2 answers

Files:insert - Google Drive SDK - Python Example - What is Drive API service instance?

USING: Windows7, Python 2.7, Google App Engine Google's documentation for inserting(creating) a file to Google Drive using Python and the Drive API. Here is the link showing the code near the bottom of the page: Write a file to a Google Drive using…
Alan Wells
  • 30,746
  • 15
  • 104
  • 152
1
vote
1 answer

Examples of using the Realtime update method in the Google Drive SDK?

Does anyone have any example illustrating https://developers.google.com/drive/v2/reference/realtime/update? What would revision_body and base_body look like in the code below for a: 1) String Model 2) List Model 3) Map Model file =…
Damon
  • 826
  • 1
  • 10
  • 25
1
vote
2 answers

Issues registering my application API on google OAuth 2.0

I am trying to add an google drive account using google api's to Owncloud, but following the instructions in http://doc.owncloud.org/server/5.0/admin_manual/configuration/custom_mount_config_gui.html always fails I have tried…
1
vote
1 answer

Google drive mime types is not correct (Google thinks that is not PDF?);

I get files from google drive(Using Java) Everything works! BUT, when I see pdf documents mime type file.getMimeType() it is something like that: application/vnd.google-apps.document it is not application/pdf Question 1: Why is my pdfs at google…
1
vote
2 answers

Google+ API 401 Invalid Credentials

I am trying to use the Google+ API to access Google Drive through a web application using javascript. I always get a 401 Invalid Credentials error, even though I have a valid access token that has not expired, (confirmed at…