Interface FlashControl

  • All Implemented Interfaces:

    @Deprecated() 
    public interface FlashControl
    
                        

    An interface that should be implemented on Views that control the flash.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum FlashControl.Mode
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract void setMode(FlashControl.Mode mode) Implementer should switch to the given mode.
      abstract void setAutoModeEnabled(boolean isEnabled) Implementer should enable the auto mode and switch to it, if enabled.
      abstract void setFlashOnIfAuto(boolean isOn) Implementer should set the flash on/off if the control is in auto mode.
      abstract void setCameraController(CameraController cameraController) A camera is required to set the flash (at least for android <M).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • setMode

         abstract void setMode(FlashControl.Mode mode)

        Implementer should switch to the given mode. Default mode should be OFF.

        Parameters:
        mode - the mode to set to.
      • setAutoModeEnabled

         abstract void setAutoModeEnabled(boolean isEnabled)

        Implementer should enable the auto mode and switch to it, if enabled. Should be disabled by default. The auto mode can still require the user of the implementers view to call setFlashOnIfAuto.

        Parameters:
        isEnabled - true to enable auto mode, false to disable it.
      • setFlashOnIfAuto

         abstract void setFlashOnIfAuto(boolean isOn)

        Implementer should set the flash on/off if the control is in auto mode.

        Parameters:
        isOn - true to set the flash on if in auto mode, false to
      • setCameraController

         abstract void setCameraController(CameraController cameraController)

        A camera is required to set the flash (at least for android <M). Implementer should check if flash is possible for this device in here, and don't show the view at all if not.

        Implementer should set the gui back to default when this is called with a none null camera. (This may be called in the background, so post gui stuff)

        Parameters:
        cameraController - the camera to use