Migration

Migration

This document explains what you need to change to migrate from a previous to a new SDK version.

1.5.0 -> 1.6.0

  1. In com.sensorberg.smartspaces.domain.Paged the property nextPageKey is now private. Use nextPageKey() function instead.
  2. The function com.sensorberg.smartspaces.sdk.BookingManager.getSchedules() requires a com.sensorberg.smartspaces.domain.PageConfig for the 4th parameter.
  3. The com.sensorberg.smartspaces.sdk.BookingManager.getSchedules() returns now a Result<Paged<TimePeriod>>.
  4. Removed com.sensorberg.smartspaces.domain.schedule.Schedule. List of TimePeriod and BookableParams are delivered separately.
  5. LetterBoxController is renamed to PostBoxController

1.4.0 -> 1.5.0

  1. com.sensorberg.smartspaces.sdk.model.TimePeriod moved to om.sensorberg.smartspaces.domain.schedule.TimePeriod.
  2. SmartSpacesSdk.refresh() expects either one Refresh or List<Refresh> as parameter.
  3. TimePeriod does no longer require a booking-id as constructor parameter.
  4. Result.onError() gets called with List<Throwable> instead of Result<Error>.
  5. Result.onSuccess() gets called with data of type T instead of Result<Success>.
  6. Result.onLoading() gets called without any parameter instead of Result<Loading>.

1.3.1 -> 1.4.0

  1. Add to your build.gradle the repository dependency maven { url "https://jitpack.io" }.
  2. Add suffix LiveData to function calls from UserManager, BookingManager and UnitController.
  3. Result.onError { ... } gives you a type Result.Error<T>. You can get a list of messages from it.
  4. Result.hasErrors() got removed. Now you must check if Result<T> it type of Result.Error<T>.
  5. Result.data got renamed to Result.dataOrNull. Alternatively you can cast to Result.Success and get data from it.