Question

We are building a web application based on Google Drive API. We'd like to incorporate a facility of displaying who is viewing our "document" in real time like Google docs and spreadsheets are doing. Implementing it from scratch would be quite challenging because of the necessity to track when a user leaves the page. So we'd first like to check if anything is already available for this purpose.

We have found out Google Analytics API may be helpful, but it can only give us a number, not user names. Google Drive Realtime API looks promising and suitable for other needs of our development, however at the moment it's not clear whether it might help with displaying current viewers.

Any ideas on possible solutions would be greatly appreciated.

Was it helpful?

Solution

This is possible in the realtime API. See https://developers.google.com/drive/realtime/handle-events#collaborator_events

There is an example of it in the Realtime Playground.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top