Class CameraKit

    • Method Detail

      • onCreated

        @Lifecycle
        @MainThread
        public void onCreated()
        Call this method in the onCreate() of the Activity/Fragment.
      • onStarted

        @Lifecycle
        @MainThread
        public void onStarted()
        Call this method in the onStarted() of the Activity/Fragment.
      • onResumed

        @Lifecycle
        @MainThread
        public void onResumed()
        Call this method in the onResumed() of the Activity/Fragment.
      • onPaused

        @Lifecycle
        @MainThread
        public void onPaused()
        Call this method in the onPaused() of the Activity/Fragment.
      • onStopped

        @Lifecycle
        @MainThread
        public void onStopped()
        Call this method in the onStopped() of the Activity/Fragment.
      • onDestroyed

        @Lifecycle
        @MainThread
        public void onDestroyed()
        Call this method in the onDestroyed() of the Activity/Fragment.
      • onCameraOpened

        @WorkerThread
        public void onCameraOpened​(boolean isFront,
                                   int cameraOrientation,
                                   int previewWidth,
                                   int previewHeight)
        Call this method to provide camera settings after camera is opened and before Camera#startPreview .

        Note: Call this method from camera thread.

        Parameters:
        isFront - true if current opened camera is front; false otherwise.
        cameraOrientation - camera orientation from CameraInfo. It should be 0, 90, 180, or 270.
        previewWidth - camera preview width
        previewHeight - camera preview height
      • setCameraKitLevel

        @MainThread
        public void setCameraKitLevel​(@NonNull
                                      CameraKitLevel level)
        Applies the preset thresholds for the selected CameraKit level.
        Parameters:
        level - the preset level to apply.
      • setCameraKitOverwrite

        @MainThread
        public void setCameraKitOverwrite​(@NonNull
                                          CameraKitParameter parameter)
        Applies overwrite thresholds on top of the current preset level.
        Parameters:
        parameter - the overwrite parameter to apply.
      • setCameraKitQualityCheckCallback

        @MainThread
        public void setCameraKitQualityCheckCallback​(@Nullable
                                                     CameraKit.CameraKitQualityCheckCallback callback)
        Set a callback to receive camera-kit quality results.
        Parameters:
        callback - a callback object to notify the completion of the operation.