Search code examples
androidgoogle-glassgoogle-gdk

Is there an error on the Google Glass LiveCard sample code on the Developer Guides?


I was going through the GDK docs on LiveCards (high frequency) and I came across this line of code:

mLiveCard.getSurfaceHolder().addCallback(new RenderThread());

RenderThread is a Class that extends Thread and does not implement any SurfaceHolder.Callback. In the other hand, in the same sample code they define LiveCardRenderer which implements DirectRenderingCallback which in turn extends SurfaceHolder.Callback. Shouldn't LiveCardRenderer be used instead of RenderThread?


Solution

  • Thanks for catching that. You're right, it should be new LiveCardRenderer(). The documentation has now been fixed.