I\'ve looked at all the SO articles I could find on this but none of the solutions work for me.
When called Camera.open(), there is a 3 second (give or take) delay where
Could you not continue your thread and call groups of ui commands together with the yourContext.runOnUiThread()
method? Then you background any blocking code, wait for the camera to be ready, and update the ui from the background thread.
For example:
private class CameraHandlerThread extends ... {
public void run() {
getCamera();
yourContext.runOnUiThread(new Runnable(){
public void run()
{
...
}
});
}
}
Then you can simply new CameraHandlerThread().start();