ProximityPresentation

class ProximityPresentation(wallet: WalletHandle, context: Context, options: WalletSdkOptions)

Drives an ISO 18013-5 proximity (BLE) presentation where this wallet is the holder: it advertises a QR engagement, accepts a reader's BLE connection, shows a consent prompt for the requested mdoc claims, and sends the response.

Public API uses only SDK types (ConsentPromptData, Event); all eu.europa.ec.eudi.* transfer types stay internal.

Typical usage from an Activity/Composable (after BLE runtime permissions are granted):

val proximity = ProximityPresentation(wallet, context, options)
proximity.start(
askConsent = { prompt -> showConsentSheet(prompt) }, // suspend, returns Boolean
onEvent = { event -> when (event) { ... } } // QrReady, Completed, Failed, ...
)
// later: proximity.stop()

BLE peripheral mode must be enabled in the wallet config (it is, via configureProximityPresentation), and the host app must hold the runtime Bluetooth permissions before calling start.

Constructors

Link copied to clipboard
constructor(wallet: WalletHandle, context: Context, options: WalletSdkOptions)

Types

Link copied to clipboard
sealed interface Event

High-level proximity lifecycle events surfaced to the host app.

Functions

Link copied to clipboard
fun start(qrSize: Int = 800, askConsent: suspend (ConsentPromptData) -> Boolean, onEvent: (ProximityPresentation.Event) -> Unit)

Begin advertising and handling a proximity presentation.

Link copied to clipboard
fun stop()

Stop the session and detach the listener. Safe to call multiple times.