 <p>OK, I found a solution and I'll post it here to help others. <a href="http://www.tutorialforandroid.com/2010/11/drawing-with-canvas-in-android-saving.html" rel="nofollow">This is the link</a> that helped me, and this is the sample of code that I needed. (it was hard to find).</p> <pre><code> public void run() { Canvas canvas = null; while (_run){ try{ canvas = mSurfaceHolder.lockCanvas(null); if(mBitmap == null){ mBitmap = Bitmap.createBitmap (1, 1, Bitmap.Config.ARGB_8888);; } final Canvas c = new Canvas (mBitmap); c.drawColor(0, PorterDuff.Mode.CLEAR); commandManager.executeAll(c); canvas.drawBitmap (mBitmap, 0, 0,null); } finally { mSurfaceHolder.unlockCanvasAndPost(canvas); } } } </code></pre> <p>}</p>