onGetUserDetailsForSimBinding
The onGetUserDetailsForSimBinding event is triggered by the SDK when user-provided SIM information and mobile number details are required to proceed with the SIM binding process. It signals the application to collect platform-specific SIM details from the user after initial consent has been obtained.
Platform-Specific behavior:
Android: The application should display a user interface prompting the user to select the SIM slot containing the mobile number they wish to bind for authentication. The user must provide both the SIM slot information and the associated mobile number(In case of the PRE_SMS sim binding flow).
iOS: The application only needs to collect the user's mobile number, as SIM management on iOS is handled by the system. This mobile number will be used for SMS OTP verification during the SIM binding process. (This callback will be applicable in case of PRE_SMS Sim Binding flow only for the iOS platform)
🎯 Purpose
To collect platform-specific SIM details from the user, allowing the developer to:
- Show instructions to the user for SIM slot selection. (Platform: Android Specific).
- Show the input field to user for collect the associated mobile number (Platform: Both Android and iOS).
🖼️ Recommended User Interface
Display the following messages to the user:
- Provide the Sim Slot selection option from the available sim. (Applicable for the Android Platform).
- Provide the input field to enter the registered mobile number. (Need to check the configured the PRE_SMS sim binding flow with the challenge response. If it is POST_SMS then no need to provide the mobile number input field.)
- Provide the Proceed button, which when clicked, should call the response API.
💻 Event Listener Code
React Native
EventEmitter.addListener('onGetUserDetailsForSimBinding', onGetUserDetailsForSimBinding);
const onGetUserDetailsForSimBinding = (response: any) => {
// response.challengeOpMode
// response.simDetails // Array of SIM details
// response.challengeResponse
// response.error
}Flutter
rdna.on(RdnaClient.onGetUserDetailsForSimBinding, onGetUserDetailsForSimBinding);
onGetUserDetailsForSimBinding(dynamic response) {
// response.challengeOpMode
// response.simDetails // List of SIM details
// response.challengeResponse
// response.error
}Cordova
document.addEventListener('onGetUserDetailsForSimBinding', onGetUserDetailsForSimBinding, false);
function onGetUserDetailsForSimBinding(response) {
// response.challengeOpMode
// response.simDetails // Array of SIM details
// response.challengeResponse
// response.error
}Native iOS
- (void)onGetUserDetailsForSimBinding:(RDNAChallengeOpMode)challengeOpMode
simDetails:(NSArray<RDNASimDetails *> *)simDetails
response:(RDNAChallengeResponse)response
error:(RDNAError)error;Native Android
void onGetUserDetailsForSimBinding(RDNAChallengeOpMode challengeOpMode,
ArrayList<RDNASimDetails> simDetails,
RDNAChallengeResponse response,
RDNAError error);If you want, I can also mock a sample response object structure for React Native / Flutter, so it’s easier to parse simDetails in the callback. This is usually helpful since it’s an array of SIM info.
Do you want me to provide that as well?
🛠️ Response API: setUserDetailsForSimBinding
Description:
This API allows the application to provide the user details for the sim binding.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| simData | String | selected slot detail and the associated mobile number. |
| challengeOpMode | Enum | The same workflow enum received in the event |
💡 Developer Actions
| Scenario | Developer Action |
|---|---|
| User provides detail | Call setUserDetailsForSimBinding(simData, challengeOpMode) |
| Error occurred | Show appropriate message from RDNAError object |
💻 API Usage
React Native
RdnaClient.setUserDetailsForSimBinding(simData, challengeOpMode, (response) => {});Flutter
rdna.setUserDetailsForSimBinding(simData, challengeOpMode);Cordova
com.uniken.rdnaplugin.RdnaClient.setUserDetailsForSimBinding(
successCallback,
errorCallback,
[simData, challengeOpMode]
);Native iOS
(RDNAError *)setUserDetailsForSimBinding:(NSString *)simData challengeOpMode:(RDNAChallengeOpMode)challengeOpMode;Native Android
RDNA.RDNAError setUserDetailsForSimBinding(String simData, RDNAChallengeOpMode challengeOpMode);🔁 Next Steps
After a user consent on sim binding flow, the SDK will trigger the next event:
getSMSOTP: Developer must display auto read SMS OTP screen in case of the PRE_SMS Sim binding flow configured. The SMS will be auto read and submit to SDK. If the flow is configured for the POST_SMS sim binding then it will skip thegetSMSOTPand trigger the[onGetUserAccountConfirmationForSimBinding](onGetUserDetailsForSimBinding)event.
Updated about 1 month ago
