This guide explains what you need to change to migrate from a previous to a new SDK version.
Result.Error
has only one throwable
property (instead of a list).PostBoxController.getNearbyPostBoxes(unitId)
with PostBoxController.getNearbyPostBoxes()
.com.sensorberg.util.ErrorReporter
.com.sensorberg.response.internal.reportExceptions
.SmartSpacesSdk.Debug.launchDebugActivity()
.SmartSpacesSdk.Builder
expects now a Set<String>
for the certificates
.SmartSpacesSdk.Builder.enableErrorReporting()
SmartSpacesSdk.Builder.enableKalmanFilter()
Please see the SDK Changelog.
BookingManager
:
from
-> endsAfter
to
-> startsBefore
getBookableUnits
requires a ISO8601 timestamp endsAfter
.SecurityController
.maven { url "https://maven.tapkey.com" }
to your root build.gradle
.Context
, you have to pass Application
as the first parameter to com.sensorberg.smartspaces.sdk.SmartSpacesSdk.Builder
.com.sensorberg.smartspaces.sdk.exception.BackendException
changed to com.sensorberg.smartspaces.exception.BackendException
.AuthenticationController.getQrCodes()
is no longer wrapped in Result
UnitController.openLiveData(unitId)
renamed to UnitController.openAsLiveData(unitId)
com.sensorberg.smartspaces.domain.Paged
the property nextPageKey
is now private. Use nextPageKey()
function instead.com.sensorberg.smartspaces.sdk.BookingManager.getSchedules()
requires a com.sensorberg.smartspaces.domain.PageConfig
for the 4th parameter.com.sensorberg.smartspaces.sdk.BookingManager.getSchedules()
returns now a Result<Paged<TimePeriod>>
.com.sensorberg.smartspaces.domain.schedule.Schedule
. List of TimePeriod
and BookableParams
are delivered separately.LetterBoxController
is renamed to PostBoxController
com.sensorberg.smartspaces.sdk.model.TimePeriod
moved to om.sensorberg.smartspaces.domain.schedule.TimePeriod
.SmartSpacesSdk.refresh()
expects either one Refresh
or List<Refresh>
as parameter.TimePeriod
does no longer require a booking-id as constructor parameter.Result.onError()
gets called with List<Throwable>
instead of Result<Error>
.Result.onSuccess()
gets called with data of type T
instead of Result<Success>
.Result.onLoading()
gets called without any parameter instead of Result<Loading>
.build.gradle
the repository dependency maven { url "https://jitpack.io" }
.LiveData
to function calls from UserManager
, BookingManager
and UnitController
.Result.onError { ... }
gives you a type Result.Error<T>
. You can get a list of messages
from it.Result.hasErrors()
got removed. Now you must check if Result<T>
it type of Result.Error<T>
.Result.data
got renamed to Result.dataOrNull
. Alternatively you can cast to Result.Success
and get data
from it.