SFA Android SDK - v2.0.0 to v3.0.0
This migration guide provides steps for upgrading from version v2.0.0 to v3.0.0 of the SFA Android SDK. The guide outlines significant changes and enhancements.
Breaking Changes
initialize Method Changes
In v3, the initialize
method will now return void upon successful initialization instead of
returning SessionData
. After successful initialization, you can use the
getSessionData method to check if the user is
logged in or not.
val initializeCF = singleFactoreAuth.initialize(this.applicationContext)
initializeCF.whenComplete { sessionData, error ->
initializeCF.whenComplete {_, error ->
if (error != null) {
// Handle error
}
else if (sessionData != null) {
// User is logged in
} else {
// User is not logged in
}
let sessionData = singleFactorAuth.getSessionData()
if(sessionData != null) {
// User is logged in
} else {
// User is not logged in
}
}