Just come to polishing my application and making it resume after the user has left. When the application restores I get an IllegalThreadStateException, which is quite annoying.
In my own test, I create the drawing thread in the surfaceCreated() method, and this solves the issue completely. This is my method implementation:
@Override public void surfaceCreated(SurfaceHolder arg0) { _thread = new DrawThread(getHolder()); _thread.setRunning(true); _thread.start(); }