Register for REL-ID SDK Events
The REL-ID SDK operates on an event-driven architecture, meaning that responses to API calls and updates are handled asynchronously via events rather than synchronous return values.
🧭 Purpose of Events
Events in the REL-ID SDK are triggered by the internal modules or plugins for several key reasons:
- 🔔 To notify the application asynchronously of updates or changes
- 🔁 To return responses to API calls made by the application
- 📊 To report internal process status
- 📥 To request input or additional data from the application in order to proceed with workflows
✅ Prerequisites for Receiving SDK Events
To correctly receive and handle SDK events, your application must follow these steps:
🧩 Step 1: Initialize the SDK
Use the initialize()
API to start the SDK and establish a session.
Important: You must set up your event listeners before initialization to capture key events like:
onInitializeProgress
onInitializeError
onInitialized
🪝 Step 2: Register Event Listeners
Ensure all required event listeners are registered before calling any SDK workflows.
Each platform requires slightly different mechanisms to hook into events (e.g., event emitters, delegates, listeners).
🛠 Step 3: Setup for Advanced Workflows (e.g., IDV)
For advanced workflows such as Identity Verification (IDV):
- You must set callback instances (e.g.,
RDNAIDVCallbacks
) after successful initialization. - This is typically done inside the
onInitialized
callback.
Following these steps ensures you never miss critical events and that your SDKintegration runs smoothly across all supported workflows.
Registering the event listener
Follow the steps in the below recipe guide to register a event listener
Note:
The name of the callback event and the data it receives will vary depending on the scenario and the SDK function you are using.For example:
onUserEnrollmentResponse
returns user ID, status, and error info.onIDVFacialMatchResponse
returns match result and confidence score.onInitializeError
returns error details about SDK startup.Always refer to the specific API or workflow documentation to understand which event will be triggered and what its payload contains.
Updated 3 months ago