Interface OverlayTorchStateListener

  • public interface OverlayTorchStateListener
    Listener that will be notified when camera torch state is updated by the overlay controller. This listener is useful when torch state is controlled from outside of the overlay controller (e.g. torch button can be placed in host activity, in that case it is responsible for torch control).
    • Method Detail

      • onTorchStateInitialised

        void onTorchStateInitialised​(boolean cameraSupportsTorch)
        Called when camera preview is started and torch support status becomes available. This can be used to show/hide torch button based on the support status.
        cameraSupportsTorch - true if camera supports torch, false otherwise.
      • onTorchStateChanged

        void onTorchStateChanged​(boolean torchOn)
        Called every time when torch state is changed, e.g. when torch is turned off or on.
        torchOn - true if torch is turned on, false otherwise.