start

abstract fun start(@NonNull handler: OnStartFinishedHandler)

Deprecated

Deprecated: use enableDetections instead.

Starts the SDK.

When this process has finished, onStartFinished will be called. This does not necessarily mean that the SDK is actually performing detections. You may use the SdkStatus passed to the onStartFinished method to determine why.

To automatically stop detections, call the start method instead. You do not need to call stop beforehand as all start calls override each other.

Note: calling this method on an uninitialized SDK will throw an SdkException.

Parameters

handler

A handler used to notify that the SDK start has finished.


abstract fun start(@Nullable stopDate: Date, @NonNull handler: OnStartFinishedHandler)

Deprecated

Deprecated: use enableDetections instead.

Starts the SDK.

This method has the same behaviour as start except an absolute Date is passed to automatically stop the SDK some time in the future. A typical use-case is when the app provides a free trial period for its users after which the SDK should stop running.

To cancel the auto-stop functionality, you can call this method with a null stopDate or just call start. You do not need to call stop beforehand as all start calls override each other.

Note: calling this method on an uninitialized SDK will throw an SdkException.

Parameters

stopDate

An absolute date at which the SDK is stopped. If the date is in the past, the SDK will stop immediately.

handler

A handler used to notify that the SDK start has finished.