I am developing a Google Glass app that uses a live card and a SurfaceView that runs in the background. What I'm trying to do is to create a dummy SurfaceView inside my custom view that the live card is rendering with DirectRenderingCallback. I have referenced the project in comment #3 and it works, but the difference is that I am not using any Activities to create the SurfaceView (if that matters).
I'm running into the issue where every time I try to start the camera preview, I get a message saying "app passed a NULL surface". I don't know whether it is because I'm creating the SurfaceView inside a service or not, but I just cannot seem to be able to get it working. Also, surfaceCreated() is never called.
As far as I know, there is nothing wrong with my code, or how I have set up the live card. I have been through the glass documentation and all of the GDK samples on their Github page. To sum it up, I'm trying to get the stream from the camera into a SurfaceView by using a Live Card. Am I doing anything wrong, or should I be doing something different to accomplish this?
Thanks.