Switch to CameraX (for api level >= 21), once it is stable (currently it is in alpha stage.). https://developer.android.com/training/camerax