startLoneWorker

open fun startLoneWorker(    @NonNull context: Context,     needToRestartService: Boolean,     @Nullable callback: LoneWorkerStartCallback)

Use this method to start the lone worker service

Parameters

context

Contextthe application context

needToRestartService

boolean : if the Lone Worker service need to be restarted

callback

LoneWorkerStartCallback : callback to be notified when the service has been started successfully or has been failed.


open fun startLoneWorker(    @NonNull context: Context,     needToRestartService: Boolean,     startCalibration: Boolean,     phoneIsLocked: Boolean,     @Nullable callback: LoneWorkerStartCallback)

Use this method to start the lone worker manager

Parameters

context

Contextthe application context

needToRestartService

boolean : if the Lone Worker service need to be restarted

startCalibration

boolean : if the Lone Worker service need to start calibration

phoneIsLocked

boolean : if the Lone Worker service need to be running only when phone is locked

callback

LoneWorkerStartCallback : callback to be notified when the service has been started successfully or has been failed.