You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now I tried to use "intent" to recreate the activity with FRONT_CAMERA set to true so that I can switch the camera but it causes a lot of bugs. Do you have an easier way for this ?
The text was updated successfully, but these errors were encountered:
In my case I resolved with :
camera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
You can change it for :
camera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
@OverRide
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
boolean useFrontCamera = getArguments().getBoolean(FRONT_CAMERA, false);
camera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK); // <-- THIS LINE
//camera = getCameraInstance(useFrontCamera);
if (camera == null) {
return;
}
initScreenParams();
parameters = camera.getParameters();
Right now I tried to use "intent" to recreate the activity with FRONT_CAMERA set to true so that I can switch the camera but it causes a lot of bugs. Do you have an easier way for this ?
The text was updated successfully, but these errors were encountered: