Android camera preview freezes when switching cameras?
问题 I am writing a custom camera for my app. It's working fine when opening the activity with either of the back or front cameras. But I'm really struggling with switching cameras inside the activity. When I tap the switching camera button, the preview freezes and nothing happens. I have tried the answers and tips suggested in other questions related to the camera and the preview, but nothing works. Here is my activity: public class CameraActivity extends Activity implements SurfaceHolder