Migration from 2.3.x to 2.4.x (Android)
This guide provides instructions for migrating from Wultra Mobile Token SDK for Android version 2.3.x
to version 2.4.x
.
Version 2.4.x
introduces a new, extensible Pre‑approval UI Template and replaces the legacy singular screen with a plural model. The goal is to make the UI configurable (images/icons/buttons/alerts) while keeping app code simple.
Added Functionality
-
Multiple Pre‑approval Screens
The singularpreApprovalScreen
is replaced bypreApprovalScreens: List<PreApprovalScreen>
inOperationUIData
. - New Screen Fields
Each screen may now specify:id: String?
— unique identifier for the screenbackButton: Boolean?
— when true, show a back button in the UI instead of using decline as “back”image: String?
— asset identifier to be mapped in the app
-
Structured Screen Content
Each screen can include typedelements
(LIST_ITEM
,ALERT
,BUTTON
) and configurablecontrols
(approve/decline UI). - Configurable Controls
decline
is optional (type: BACK | REJECT
, optionaltext
)approve
is optional (type: SLIDER | BUTTON
, optionaltext
, optionalcounter
). Apps should provide a default approve control if missing. The counter defines how long (in seconds) the approve control remains disabled after the screen appears.axis: HORIZONTAL | VERTICAL
andflip: Boolean
control layout order/stacking
- Configurable Visuals
- Screen
image
and list itemicon
are resolved from app assets.
- Screen
- Reject method
- The
OperationsService
reject method acceptsmobileTokenData
, just like confirm. If applicable, these values should be attached to the operation when calling confirm/reject methods.
- The
- New RejectionReason
- New rejection reason
PREAPPROVAL
indicates the user cancelled the operation during the Pre-Approval flow.
- New rejection reason
Removed / Changed Functionality
- Singular Pre‑approval Removed from
OperationUIData
- Removed:
preApprovalScreen
(object withitems
andapprovalType
) - Replaced by:
preApprovalScreens: List<PreApprovalScreen>
- Removed:
- Ad‑hoc Fields Removed
- Removed:
items: [String]
→ useelements
withtype: "LIST_ITEM"
andtext
- Removed:
approvalType
→ usecontrols.approve.type
(SLIDER
orBUTTON
)
- Removed:
- Legacy Fallback Behavior
- If plural is present, singular is ignored.
- If plural is absent, the SDK still converts the legacy singular via the deserializer (maps
items
→elements
,approvalType
→controls.approve.type
), but your app’s model must be updated.
Server / JSON Migration
Before (2.3.x – singular):
{
"flipButtons": true,
"blockApprovalOnCall": false,
"preApprovalScreen": {
"type": "WARNING",
"heading": "Watch out!",
"message": "You may become a victim of an attack.",
"items": [
"You activate a new app and allow access to your accounts",
"Make sure the activation takes place on your device",
"If you have been prompted for this operation in connection with a payment, decline it"
],
"approvalType": "SLIDER"
}
}
After (2.4.x – plural):
{
"flipButtons": true,
"blockApprovalOnCall": false,
"preApprovalScreens": [
{
"id": "custom_id",
"type": "WARNING",
"backButton": true,
"image": "image-label",
"heading": "Watch out!",
"message": "You may become a victim of an attack.",
"elements": [
{ "id": "e1", "type": "ALERT", "style": "INFO", "text": "Make sure the activation takes place on your device" },
{ "id": "e2", "type": "BUTTON", "action": "PHONE", "text": "Call center", "href": "+42012345678" },
{ "id": "e3", "type": "LIST_ITEM", "icon": "icon-label", "text": "You activate a new app and allow access to your accounts" }
],
"controls": {
"flip": true,
"axis": "VERTICAL",
"decline": { "type": "REJECT", "text": "Reject Payment" },
"approve": { "type": "BUTTON", "text": "Approve Payment", "counter": 10 }
}
},
{
"id": "qr1",
"type": "QR_SCAN",
"heading": "Watch out!",
"message": "You may become a victim of an attack."
}
]
}
Migration Checklist
- Replace
preApprovalScreen
→preApprovalScreens
. - Replace
items
→elements
of typeLIST_ITEM
. - Map
approvalType
→controls.approve.type
. - Use
id
,backButton
,image
when present. - For ease of use, consider using new RejectionReason
PREAPPROVAL
when rejecting operations during pre-approval screens flow.
Last updated on Oct 10, 2025 (08:14)
Edit on Github
Send Feedback