Example Usage
This is an example of the most common use case of this SDK - fetching operations and approving them.
SDK Integration
Follow the SDK Integration tutorial for SDK installation.
Example Code
// PowerAuth instance needs to be configured and a user-activated instance.
// More about PowerAuth SDK can be found here: https://github.com/wultra/powerauth-mobile-sdk
fun exampleUsage(appContext: Context, powerAuth: PowerAuthSDK) {
// Create the WultraMobileToken instance
val wmt = powerAuth.createWultraMobileToken(appContext, acceptLanguage = "de")
// Fetch operations using a callback
wmt.operations.getOperations {
it.onSuccess { operations ->
// Handle operations
for (operation in operations) {
// Process each operation
}
}.onFailure { error ->
// Handle error
}
}
}
For more examples see IntegrationTests
Read Next
Last updated on Feb 13, 2025 (13:07)
Edit on Github
Send Feedback