I’m developing a barcode scanning app that has the following the functionality:
• Access device camera , preview camera on SurfaceView , and automatically refocus
You could just use override of the Camera.AutoFocusCallback interface. Or try to make "autoFocusCallback" varialbe static. It would help.