launch

fun launch(foreground: Boolean, notification: Notification? = null, enableVibrateOnReaderGrantedAccess: Boolean = true, vibrateDuration: Duration = 500.toDuration(DurationUnit.MILLISECONDS)): SeamResult<Unit>

Starts UnlockWithTap scanning.

Once you launch unlockWithTap, it automatically starts scanning whenever it is possible to scan and stops scanning whenever it is not possible to scan.

Return

Success or failure launching UnlockWithTap. If the launch fails, returns an SeamError to explain the failure.

Parameters

foreground

Indicates whether to perform UnlockWithTap scanning in the phone foreground. For more details, see the Android Foreground services documentation.

notification

Custom Android-specific notification object that enables you to indicate that the phone is scanning for locks. This notification is only shown for scanning that is running as a foreground service. Required for ASSA ABLOY.

enableVibrateOnReaderGrantedAccess

Indicates whether the phone should vibrate when it unlocks an entrance. Default: true

vibrateDuration

Vibration duration if enableVibrateOnReaderGrantedAccess is true. Default: 500 milliseconds