Will there be a way to allow glass to identify bar codes and have your device subscribe to them? I've only seen location options so far. If not can you subscribe to a photo taken to determine if it's a bar code? or have your program added to menu options available to photos taken?
3 Answers
The closest you can get to this with the current version of the Mirror API is with a share Contact.
Take a peek at the Add A Cat to That example use case. It describes a scenario in which a user shares a photo with a contact that represents a Glassware and adds a picture of a cat to it. You could use the same flow to download the photo, identify bar codes, extract the encoded information and take an action within your Glassware.
Here's a sequence diagram of this image processing flow:
Note that in this case the user must explicitly share each photo to be scanned for bar codes. If you have an idea of how we can extend this API to support this functionality, please file it in the official issue tracker.

- 13,974
- 3
- 45
- 74
It should be possible to do something like this with the API by registering your "Bar code reader" as a Contact and adding a subscription
This will allow users to share photos with you, meaning you can retrieve the image on your server and check if there is a bar code, decode it and perform some action based on it.

- 15,009
- 2
- 35
- 24
This is not yet supported by the Glass client nor the API. Feel free to file a feature request in our issue tracker.

- 6,044
- 21
- 27