Acting on a notification
🔁 REL-ID SDK API: updateNotification
🧩 Overview
The updateNotification
API is used to respond to a user notification (e.g. login request, device access) using the notification_uuid
received from onGetNotifications
.
This must be called with:
notificationID
: UUID from the notificationresponse
: Action chosen by the user (e.g.,"accept"
,"reject"
,"fraud"
). This is case sensitive, use exact action in the notification data.
🧪 Method Signature by Platform
Platform | Method Signature |
---|---|
React Native | RdnaClient.updateNotification(notificationID, response, callback) |
Flutter | rdnaClient.updateNotification(notificationID, response) |
Cordova | com.uniken.rdnaplugin.RdnaClient.updateNotification(success, error, [notificationID, response]) |
Android | RDNAError updateNotification(String notificationID, String response) |
iOS | - (RDNAError *)updateNotification:(NSString *)notificationID withResponse:(NSString *)response |
📥 Parameters
Parameter | Type | Required | Description |
---|---|---|---|
notificationID | String | Yes | Notification UUID to respond to |
response | String | Yes | Response value - accept , reject , or fraud |
📡 onUpdateNotification Event
Triggered after SDK processes the response.
📱 React Native
RdnaClient.on(RdnaClient.onUpdateNotification, (event) => {
console.log("onUpdateNotification:", event);
});
📱 Flutter
rdnaClient.on(RdnaClient.onUpdateNotification, (data) {
print("onUpdateNotification: $data");
});
📱 Cordova
document.addEventListener("onUpdateNotification", function(event) {
console.log("onUpdateNotification:", event);
});
📱 Native Android
@Override
public void onUpdateNotification(RDNAStatusUpdateNotification status) {
Log.d("SDK", "Update result: " + status.getNotificationID());
}
📱 Native iOS
- (int)onUpdateNotification:(RDNAStatusUpdateNotification *)status {
NSLog(@"Updated notification: %@", status.notificationID);
return 0;
}
✅ Sample Success Response
{
"errCode": 0,
"error": {
"shortErrorCode": 0,
"longErrorCode": 0,
"errorString": "Success"
},
"eMethId": 15,
"pArgs": {
"response": {
"ResponseData": {
"status_code": 100,
"message": "Success",
"notification_uuid": "77bad8a0-0495-4c97-bad8-a004952c9721",
"is_ds_verified": true
}
}
}
}
🧠 Developer Notes
- Values for
response
are case-sensitive. - Wait for
onUpdateNotification
before updating UI state. - Use
is_ds_verified
to check if signing succeeded. - If authlevel is defined other than 0 for an action, then step up authentication flow will kick in.
Updated about 2 months ago