Interface ICameraViewController
-
- All Implemented Interfaces:
public interface ICameraViewController
Base interface class for the Classical components View to control the behavior and trigger actions
-
-
Method Summary
Modifier and Type Method Description abstract Unit
)>setLifecycleOwner(<Error class: unknown class> lifecycleOwner)
Sets LifecycleOwner for CameraX view. abstract Unit
takePicture(Boolean acquireFocus)
Takes picture. abstract Unit
startPreview()
Starts/resumes camera preview stream. abstract Unit
stopPreview()
Stops camera preview stream. abstract Unit
restartPreview()
Restarts preview stream. abstract Unit
continuousFocus()
Cancels auto-focus and performs continuous-focus. abstract Unit
useFlash(Boolean flash)
Enables or disables camera flash. -
-
Method Detail
-
setLifecycleOwner
abstract Unit )>setLifecycleOwner(<Error class: unknown class> lifecycleOwner)
Sets LifecycleOwner for CameraX view. This is required to properly handle CameraX lifecycle.
-
takePicture
abstract Unit takePicture(Boolean acquireFocus)
Takes picture.
This is asynchronous process, so results are reported via IViewCameraCallback. If snapping process is still going all subsequent calls to takePicture are ignored.
After picture is taken, camera preview is stopped. If you wish it continue, use startPreview If view is paused, this call is ignored.
- Parameters:
acquireFocus
- true to perform auto-focus before shooting.
-
startPreview
abstract Unit startPreview()
Starts/resumes camera preview stream. Usually used after picture was taken.
-
stopPreview
abstract Unit stopPreview()
Stops camera preview stream.
-
restartPreview
abstract Unit restartPreview()
Restarts preview stream.
-
continuousFocus
abstract Unit continuousFocus()
Cancels auto-focus and performs continuous-focus. Should be executed from the main thread and when camera is opened
If there is no continuous-focus capabilities on this device, does auto-focus.
If view is paused, this call is ignored.
-
-
-
-