Search code examples
google-glassgoogle-mirror-api

How would I call a web-service from Google Glass


I was exploring Google glass. From the dev guides it is clear that to call web services I need to Mirror Apis. But mirror APIs seems to me a platform that helps inserting cards into Glass timeline from remote location. Can Mirror API help me to get the data from some remote server and return a JSON or XML response ? Or Otherwise via Mirror API I need to parse the response and prepare a Card there to push it to Glass Timeline.

Anyone please help me out on this query.


Solution

  • Neither API, Mirror or GDK, will actually do the work of calling the remote server and getting a response - those are normal things that you should be able to do with the underlying tools they are built on (whatever platform you choose to develop with, if you're using Mirror, or Android if you're using the GDK).

    What both APIs support, however, is helping you deliver that information to Glass in the most appropriate way possible.

    The Mirror API is good for Glassware that is accessed over the Internet and work with the native timeline operations that Glass provides. The GDK is useful for more immersive or dynamic applications that don't necessarily work with the timeline or the network.