top | android | coffee | dealing_with_companies | dev_blog | experiments | food | fun | io15 | politics | products | random | security | startups | tech_events | thoughts | wearables |

19 May 2014, 15:53

LowFreqLiveCard - Example of a low frequency LiveCard using GDK for Google Glass

Share

LowFreqLiveCard - Example of a low frequency LiveCard using GDK for Google Glass

I wrote an example of a low frequency LiveCard using GDK for Google Glass. The master branch uses Gradle, the legacy branch is able to be imported into Eclipse.

This code is heavily based on the Live Card documentation on the GDK section of the Glass developer docs. The reason that I wanted to do this was that I wanted something that required as little code as possible to run.

Code

Here’s the entire source for the Service that creates and publishes the LiveCard. It’s very similar to what you see in the documentation.

Notes

A couple of notes, it uses a custom voice command, launch with:

'Ok Glass, start my awesome app'

This displays random data, it is not correct, and Glass does not have a built in HRM that I’m aware of. It will display a new value every 3 seconds, and will stop updating after 10 values have been generated.

Importing

Instructions for importing legacy version into Eclipse.

Instructions for importing into Android Studio.

Instructions for importing into IntelliJ. A note on this one, you’ll actually import this as a Gradle project, not ‘from existing sources’. Everything should be configured correctly to allow it to be imported as a Gradle project.

Source

Full source available on GitHub.

comments powered by Disqus