I am trying to figure out which threads should do what in Android.
The only thing I found in the official documentation is that camera.open() should be placed in its own stream.
What about:
camera.startPreview()camera.stopPreview()camera.release()
It does not indicate which stream they need. Should they run on the main thread (ui thread)? Or can I choose?
Why am I trying to figure this out? camera.startPreview() when launched in the main thread, causes my application to tremble / lag for a short period of time, this greatly affects my application, because it is placed inside the viewPager, and I do not want the camera to always view (which will not cause a delay, but will require system resources).
Any ideas?
java android multithreading camera
Karl Morrison
source share