google-mirror-api

Google Mirror API throwing BadStatusLine exception (Python)

你说的曾经没有我的故事 提交于 2019-12-04 12:31:34
When using the Mirror API, I randomly get a "BadStatusLine" exception from several API calls, including timeline().insert and timeline.list . From trolling around SO for simliar problems in python, I suspect this is some kind of malformed response from the server. It seems to happen randomly and possibly after a period of not using the API. Here's a sample stack trace: Traceback (most recent call last): File "service.py", line 61, in receive_message self.process_user_chat(msg) File "service.py", line 304, in process_user_chat self.upsert_timeline_item(sourceItemId, body) File "service.py",

Is it possible to register a top-level intent in the Mirror API?

走远了吗. 提交于 2019-12-04 03:56:07
Example "top-level actions" would be "Google," "take a picture," etc. Is it possible using the Mirror API to register a custom top-level event? "OK Glass, crunchify me." A secondary question I have is if it's possible to take user speech. Using the "OK Glass, Google" example, the user says a query that Google takes and acts on. Is it possible to capture that for your custom action using the Mirror API? This is not yet possible with the Glass client nor the Mirror API. However, there is already a filed feature request that you can follow to get updates on the progress. You can do that right now

Attaching video with video/vnd.google-glass.stream-url after Update XE6

安稳与你 提交于 2019-12-04 02:13:43
问题 Attaching video with the XE6 Google Glass Update is getting stuck. The code I'm using is this: String videoUrl = "http://www.youtube.com/watch?v=9bZkp7q19f0"; if (videoUrl != null) { String contentType = "video/vnd.google-glass.stream-url"; InputStream is = new ByteArrayInputStream( videoUrl.getBytes( ) ); MirrorClient.insertTimelineItem(credential, timelineItem, contentType, is); } Not sure what I'm doing wrong, but the video is still trying to download and it's killing my battery ... 回答1: I

how to connect Android phone with Google Glass for data sharing

孤街浪徒 提交于 2019-12-03 16:50:25
I've made my app running on the Google Glass, but it's a little slow in real time. Is there a way to connect my Android phone with the Glass for data communication, so that the phone can take care of the calculation, and the Glass only show the result? The Glass can tether with Android phone by bluetooth, so it should be able to transmit data via it? Don't know if it's possible to run my app on cloud server and send the result back to my Glass, but guessing that would be slow as well. Any suggestion is more than welcome! thanks. Yes, you can connect your Android phone with Glass for data

Is it possible to play with Google Mirror API without having the device?

∥☆過路亽.° 提交于 2019-12-03 10:51:53
I've been reading the documentation and playing at https://glass-java-starter-demo.appspot.com/ but it seems there is no way to further investigate since when following the instructions from https://developers.google.com/glass/playground at my https://code.google.com/apis/console/ the Google Mirror switch is not showing up. Is there any workaround? According to issue #2 on the tracker ( https://code.google.com/p/google-glass-api/issues/detail?id=2 ) access is currently restricted to members of the Explorer program with Glass. With the release of XE12, the Mirror API is open to all developers.

Deadline exceeded while posting multiple cards to timelines with a video attached

早过忘川 提交于 2019-12-03 09:04:52
first of all i'm using python over gae and i'm trying to push a card with a video attachment to all the users that visited my glassware. This is the code: #posting video media_link = util.get_full_url(self, '/static/video/man_on_the_moon.mp4') resp = urlfetch.fetch(media_link, deadline=2000) media_video = MediaIoBaseUpload(io.BytesIO(resp.content), mimetype='video/vnd.google-glass.stream-url', resumable=True) users = Credentials.all() for user in users: creds = StorageByKeyName(Credentials, user.key().name(), 'credentials').get() mirror_service = util.create_service('mirror', 'v1', creds)

Hello World program for Google Glass - Step by Step

旧巷老猫 提交于 2019-12-03 02:50:34
I started reading stuff on Google Glass development one week ago, including this . However, I still could not find a tutorial to develop a "complete hello world program". What I meant by "complete" is; where to get the API, how to set up the API, how to write the hello world UI, how to write the code for the UI, how to install the emulator/simulator and test it. For an example, if you take a Java / Android / C++ / C# book, the first chapter is a hello world program, the "complete note" which explains how to develop it, step by step, making sure the new user is not in a mess. I went through the

receive UDP data on Google Glass with GDK

耗尽温柔 提交于 2019-12-02 15:21:11
问题 Any recommendations for receiving UDP data from an app running on Google Glass? I need to integrate with an existing system. This system does UDP broadcasts to the local subnet. The Glass will be on the same subnet and the app running on the Glass just needs to listen on a port for UDP packets and then display information contained in them to the user. I'm integrating with an existing system which I don't have the freedom to change at this point and so want to just receive UDP (as opposed to

receive UDP data on Google Glass with GDK

时光总嘲笑我的痴心妄想 提交于 2019-12-02 03:40:07
Any recommendations for receiving UDP data from an app running on Google Glass? I need to integrate with an existing system. This system does UDP broadcasts to the local subnet. The Glass will be on the same subnet and the app running on the Glass just needs to listen on a port for UDP packets and then display information contained in them to the user. I'm integrating with an existing system which I don't have the freedom to change at this point and so want to just receive UDP (as opposed to using other, perhaps better, higher level frameworks). Looking around the docs I see network related

Attaching video with video/vnd.google-glass.stream-url after Update XE6

拟墨画扇 提交于 2019-12-01 13:00:12
Attaching video with the XE6 Google Glass Update is getting stuck. The code I'm using is this: String videoUrl = "http://www.youtube.com/watch?v=9bZkp7q19f0"; if (videoUrl != null) { String contentType = "video/vnd.google-glass.stream-url"; InputStream is = new ByteArrayInputStream( videoUrl.getBytes( ) ); MirrorClient.insertTimelineItem(credential, timelineItem, contentType, is); } Not sure what I'm doing wrong, but the video is still trying to download and it's killing my battery ... I think the issue is that you're trying to stream a YouTube page instead of stream the video from that page