Multiple choice technology platforms and products

In which method, you normally stop the camera and release the resources associated to the camera in Android.

  1. SurfaceReleased

  2. SurfaceDestroyed

  3. CameraReleased

  4. None of above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Android Camera API, SurfaceCreated is called when the surface is ready, and SurfaceDestroyed is called when the surface is being destroyed. This is the appropriate time to stop camera preview and release camera resources to prevent memory leaks.