Ejemplo n.º 1
0
 public void SelectCamera(bool front)
 {
     if (mCamSettings)
     {
         mCamSettings.SelectCamera(front ? CameraDevice.CameraDirection.CAMERA_FRONT : CameraDevice.CameraDirection.CAMERA_BACK);
     }
 }
    public void ToggleFrontCamera()
    {
        if (mCamSettings)
        {
            mCamSettings.SelectCamera(mCamSettings.IsFrontCameraActive() ? CameraDevice.CameraDirection.CAMERA_BACK : CameraDevice.CameraDirection.CAMERA_FRONT);

            // Toggle flash if it is on while switching to front camera
            Toggle flashToggle = FindUISelectableWithText <Toggle>("Flash");
            if (mCamSettings.IsFrontCameraActive() && flashToggle && flashToggle.isOn)
            {
                ToggleTorch();
            }
        }
    }
Ejemplo n.º 3
0
    public void SelectCamera(bool front)
    {
        if (mCamSettings)
        {
            mCamSettings.SelectCamera(front ? CameraDevice.CameraDirection.CAMERA_FRONT : CameraDevice.CameraDirection.CAMERA_BACK);

            // Toggle flash if it is on while switching to front camera
            Toggle flashToggle = FindUISelectableWithText <Toggle>("Flash");
            if (front && flashToggle && flashToggle.isOn)
            {
                ToggleTorch();
            }
        }
    }
Ejemplo n.º 4
0
    public void ToggleFrontCamera(bool enabled)
    {
        if (m_CameraSettings)
        {
            m_CameraSettings.SelectCamera(m_CameraSettings.IsFrontCameraActive() ?
                                          CameraDevice.CameraDirection.CAMERA_BACK :
                                          CameraDevice.CameraDirection.CAMERA_FRONT);

            // Toggle flash if it is on while switching to front camera
            if (m_CameraSettings.IsFrontCameraActive() && m_FlashToggle && m_FlashToggle.isOn)
            {
                ToggleTorch(false);
            }
        }
    }