Migration Guide
Guide to migrate from Legacy Headless SDK to New Headless SDK
Overview
This guide will help you migrate from the legacy OTPLESS Headless SDK to the new version. The new SDK offers improved performance, reliability, and security features.
Key Changes
-
Package Name Change
- Legacy:
io.github.otpless-tech:otpless-android-sdk
- New:
io.github.otpless-tech:otpless-headless-sdk
- Legacy:
-
Minimum Requirements
- compileSdk 35
- minSdk 21 (Android 5.0)
- Kotlin 1.9.0+
- Gradle 8.3.1+
Migration Steps
1. Update Dependencies
Please check the latest version of the SDK here.
2. Update Import Statements
3. Update Initialization
4. Update URL Handling
In Activity:
5. Update Request Objects
6. Update Authentication Calls
7. Update Response Handling
The callback handling has been significantly improved in the new SDK. Here’s how to migrate your callback implementation (For more information find new sdk documentation):
Key Differences in Response Handling:
-
Error Handling
- Legacy SDK: Basic error message extraction
- New SDK: Comprehensive error handling with specific error codes and messages
-
Silent Authentication The new SDK adds support for Silent Authentication (SNA) with proper fallback handling:
-
Delivery Status The new SDK provides detailed delivery status information:
Key Benefits of Migration
- Improved Performance: The new SDK is significantly faster and more efficient.
- Better Error Handling: More detailed error responses and improved error handling.
- Modern Kotlin Features: Utilizes Kotlin Coroutines for better concurrency.
- Improved Type Safety: Better type safety with enhanced Kotlin type system usage.
Need Help?
If you encounter any issues during migration, please reach out to our support team or refer to our documentation.
Was this page helpful?