onFitAddUnlockMethod(listener: FitAddUnlockMethodListener)

Requires:
@ray-js/lock-sdk≥1.2.0

Description

Register an accessory-side listener for add-unlock-method steps

Parameters

ParameterTypeRequiredDescription
YesEvent listener

Return Value

Type: void
None

Valid Values

FitStepEvent.type
ValueDescriptionSince
finger--
face--
password--
card--
fingerVein--
hand--
eye--
FitSuccessEvent.type
ValueDescriptionSince
finger--
face--
password--
card--
fingerVein--
hand--
eye--
FitErrorEvent.type
ValueDescriptionSince
finger--
face--
password--
card--
fingerVein--
hand--
eye--

Examples

import { onFitAddUnlockMethod } from '@ray-js/lock-sdk';
onFitAddUnlockMethod((event) => {
  if (event.stage === 'step') console.log(event.step, event.total);
});