Migration Guide

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

1.10.x -> 1.11.0

  • Result.Error has only one throwable property (instead of a list).
  • Replace PostBoxController.getNearbyPostBoxes(unitId) with PostBoxController.getNearbyPostBoxes().
  • Remove com.sensorberg.util.ErrorReporter.
  • Remove extension function com.sensorberg.response.internal.reportExceptions.
  • Remove SmartSpacesSdk.Debug.launchDebugActivity().
  • SmartSpacesSdk.Builder expects now a Set<String> for the certificates.
  • Remove SmartSpacesSdk.Builder.enableErrorReporting()
  • Remove SmartSpacesSdk.Builder.enableKalmanFilter()

1.9.0 -> 1.10.0

Please see the SDK Changelog.

  • Where the SDK returns a LiveData, most of the data types are explicitely marked as nullable.

1.8.0 -> 1.9.0

  • In BookingManager:
    • function parameter renamed: from -> endsAfter
    • function parameter renamed: to -> startsBefore
    • getBookableUnits requires a ISO8601 timestamp endsAfter.
  • Removed SecurityController.

1.7.0 -> 1.8.0

  • Add maven { url "https://maven.tapkey.com" } to your root build.gradle.
  • Instead of Context, you have to pass Application as the first parameter to com.sensorberg.smartspaces.sdk.SmartSpacesSdk.Builder.
  • The package com.sensorberg.smartspaces.sdk.exception.BackendException changed to com.sensorberg.smartspaces.exception.BackendException.

1.6.0 -> 1.7.0

  • The result of AuthenticationController.getQrCodes() is no longer wrapped in Result
  • UnitController.openLiveData(unitId) renamed to UnitController.openAsLiveData(unitId)

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.