Search code examples
google-plusgoogle-hangouts

Is there any way to access the shared state of a Hangout app from outside the Hangout?


I'm fairly sure the answer's going to be no, though it seems like more of a security/policy restriction than a technical impossibility. But basically, I have an idea for a server that communicates with a Hangout app via ajax calls, and sometimes the server might have new data that I would like to "push" to the Hangout app, rather than waiting for the app to request new updates. My thinking is that being able to trigger the onStateChanged event would be a convenient hook.

But if this is impossible, I guess I can just poll my server in set intervals for updates, though this seems clunky.


Solution

  • No, the shared state can't be accessed from outside the Hangout, so you will have to implement the communication with your server yourself in some way.

    If you don't want to do polling, I created a demo a while ago that uses the App Engine Channel API to push external updates to a Hangout application: https://github.com/Scarygami/gplus-experiments/tree/master/hangout-chat