onGetUserConsentForSimBinding
The onGetUserConsentForSimBinding event is triggered by the REL-ID SDK to initiate the SIM binding process. This callback is invoked to collect user consent before starting the SIM binding registration. Applications can use this event to manage the flow of the SIM binding process and present action buttons for obtaining user consent.
🎯 Purpose
To notify the app that a Sim Binding process is initiated, allowing the developer to:
- Show instructions to the user for the required permission, SMS charges and other sim binding process related process.
- Collect user consent.
- Proceed with sim binding flow by invoking the corresponding API:
[setUserConsentForSimBinding](setIDVDocumentScanProcessStartConfirmation).
🖼️ Recommended User Interface
Display the following messages to the user for iOS Platform:
- Your mobile number will be registered with [App Name].
- An OTP will be sent to your registered mobile number for verification.
- Keep the app open while auto-reading the SMS OTP for SIM binding. Moving the app to the background may interrupt OTP detection.
- After OTP verification, an SMS will be sent from your selected mobile number to enable verification.
- Standard SMS charges may apply.
- You will need to send the SMS within 5 seconds once the messages app opens.
- After SMS verification, you will be asked to select the account to associate with your user ID.
- A Start or Proceed button, which when clicked, should call the response API.
Display the following messages to the user for Android Platform:
- In Next step [App Name] will prompted for the Read Phone state and SMS permissions, Please tap 'Allow' to continue with SIM binding.
- Your mobile number will be registered with [App Name].
- An OTP will be sent to your registered mobile number for verification.
- Keep the app open while auto-reading the SMS OTP for SIM binding. Moving the app to the background may interrupt OTP detection.
- After OTP verification, an SMS will be sent from your selected mobile number to enable verification. Standard SMS charges may apply.
- After SMS verification, you will be asked to select the account to associate with your user ID.
- A Start or Proceed button, which when clicked, should call the response API.
💻 Event Listener Code
React Native
EventEmitter.addListener('onGetUserConsentForSimBinding', onGetUserConsentForSimBinding);
const onGetUserConsentForSimBinding = (response: any) => {
// response.challengeOpMode
// response.challengeResponse
// response.error
}Flutter
rdna.on(RdnaClient.onGetUserConsentForSimBinding, onGetUserConsentForSimBinding);
onGetUserConsentForSimBinding(dynamic response) {
// response.challengeOpMode
// response.challengeResponse
// response.error
}Cordova
document.addEventListener('onGetUserConsentForSimBinding', onGetUserConsentForSimBinding, false);Native iOS
(void)onGetUserConsentForSimBinding:(RDNAChallengeOpMode)challengeOpMode
response:(RDNAChallengeResponse)response
error:(RDNAError)error;Native Android
void onGetUserConsentForSimBinding(String response);🛠️ Response API: setUserConsentForSimBinding
Description:
This API allows the application to provide the user details for the sim binding.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| isConfirm | Boolean | true to start scanning; false to cancel and redirect to appropriate flow |
| challengeOpMode | Enum | The same workflow enum received in the event |
💡 Developer Actions
| Scenario | Developer Action |
|---|---|
| User agrees | Call setUserConsentForSimBinding(true, challengeOpMode) |
| User cancels | Call setUserConsentForSimBinding(false, challengeOpMode) |
| Error occurred | Show appropriate message from RDNAError object |
💻 API Usage
React Native
RdnaClient.setUserConsentForSimBinding(true, challengeOpMode, (response) => {});Flutter
rdna.setUserConsentForSimBinding(true, challengeOpMode);Cordova
com.uniken.rdnaplugin.RdnaClient.setUserConsentForSimBinding(
successCallback,
errorCallback,
[true, challengeOpMode]
);Native iOS
(RDNAError *)setUserConsentForSimBinding:(BOOL)userConsent challengeOpMode:(int)challengeOpMode;Native Android
RDNA.RDNAError setUserConsentForSimBinding(boolean userConsent, int challengeOpMode);🔁 Next Steps
After a user consent on sim binding flow, the SDK will trigger the next event:
onGetUserDetailsForSimBinding: Developer must display sim Slot selection option and mobile number input field to get the registered mobile number.
Updated about 1 month ago
