createProximityPresentationSession

suspend fun createProximityPresentationSession(activity: Activity, authenticationOption: AuthenticationOption = AuthenticationOption.Signature, bleMode: <Error class: unknown class> = BleMode.MDocClientCentral, onRequestReceived: ProximityPresentationSession.OnRequestReceived, onConnected: ProximityPresentationSession.OnConnected? = null, onSessionTerminated: ProximityPresentationSession.OnSessionTerminated? = null): ProximityPresentationSession

Create a proximity based presentation session with a mobile credential verifier using the ISO 18013-5 based DeviceRetrieval.

This function requires the calling application to have been granted the following bluetooth related permissions.

For Android versions R and below: android.permission.BLUETOOTH android.permission.BLUETOOTH_ADMIN android.permission.ACCESS_FINE_LOCATION android.permission.ACCESS_COARSE_LOCATION

For Android versions above R: android.permission.BLUETOOTH_SCAN android.permission.BLUETOOTH_ADVERTISE android.permission.BLUETOOTH_CONNECT

If the application using this SDK hasn't already tried to use bluetooth before, calling this function will result in a system UI prompt asking the user to grant the application permission to use bluetooth. However, if the user has already been asked for this permission, either through interaction with another part of the application or through a prior call to this function made by the app and they denied the request, then the HolderException.BluetoothPermissionException exception will be thrown in response until the user explicitly grants the application bluetooth permission in their OS app settings.

Return

The newly created proximity presentation session represented as an instance of ProximityPresentationSession

Parameters

authenticationOption

device authentication option to be used for mobile credentials which are presented in the established session

onRequestReceived

callback when a request to present mobile credentials is received

onConnected

callback when a connection has been established with a mobile credential verifier

onSessionTerminated

callback when a data transport session has been terminated

Throws