Camera

The camera device can be accessed from an Android phone using the android.hardware.CameraDevice class. The initialization procedure are as follows: CameraDevice camera = CameraDevice.open;

As you can see, we use a singleton pattern here where the CameraDevice just needs an open or close method to activate or deactivate respectively.