Getting started

Example App Source Code

You can find a sample App implementation of the SDK here

For the sample App you need to provide a base url, an OAuth-Token and a ssl certificate. All informations can be found here


For detailed description of the SDK methods you can find the JavaDocs here


Grab the latest SDK via Gradle:

implementation 'com.sensorberg.smartspaces:sdk:VERSION'

to let Gradle download the SDK from our servers. You can find the latest VERSION on our Maven Repository. You also need to create a global file in USER_HOME/.gradle/


replace <username> and <password> with the credentials provided by us.

To setup the maven repository in your app you have to open the build.gradle file of your app module (not the root) and add the following snippet:

repositories {
    maven {
        url MAVEN_URL
        credentials {
            username = MAVEN_USERNAME
            password = MAVEN_PASSWORD

Because of the changes and improvements of the Bluetooth API and BLE with Android 5.0 the Android minSdkVersion for our SDK is 21. So your project needs to set the minSdkVersion also to 21 or higher.

You need also to add packagingOptions to the app build.gradle.

packagingOptions {
  exclude 'META-INF/lib_release.kotlin_module'
  exclude 'META-INF/library_release.kotlin_module'

SDK Initialization

Use the SmartSpacesSdk.Builder to initialize the SDK

val sdk = SmartSpacesSdk.Builder(this)

You need to provide the BASE_URL of the server, the OAUTH_TOKEN to authenticate the app at the server and the SSL certificate CERTIFICATE of the server. All this information will be provided by us.

As of LiveData is the new way in Android to have lifecycle safe operations, our SDK is using LiveData. If you are not familiar with LiveData please visit the Android Developers Guide

If you like you can also view the JavaDocs to get an overview of all included methods.


Following permissions will be merged to your projects AndroidManifest.xml automagicaly by Gradle

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

The only thing you have to do is to ask the user for location permission to use the SDK.


We are using Timber for logging in our SDK (See Timber GitHub). If you want to see the logging of the SDK use Timber and add an Timber.Tree to enable logging.

Timber.plant(object : Timber.Tree() {
    override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
        Log.d("DEBUG", message)

The Smart-Spaces SDK

This is the main entry point to access all the functions. From there one can access the other interfaces. The SDK must be a singleton in the application. The SDK have the following main interfaces.

User Manager

Manages user authentication. Provides methods for login, logout, change password, get user and get logged status. To acquire the single instance of the user manager call sdk.getUserManager()

Unit Controller

Via the Unit Controller the app can access available and nearby units, filter by type and command them to open.
To acquire the single instance of the Unit Controller call sdk.getUnitController()

The Booking Manager

With the booking manager you are able to create bookings of a room or a locker, delete bookings which are not started yet or end currently ongoing bookings.
To acquire the single instance of the Unit Controller call sdk.getBookingManager()

The Tap Controller

Controller for magneto and NFC “tap” actions. To acquire the single instance of the tap controller call sdk.getTapController()

Refreshing data

There’s also a refresh() method that will re-query backend for latest information regarding user, units, schedules, etc. Existing LiveData<Response> will change to executing (with the old values still available in .data field) and it will get updated once the API calls succeeded.