PostBoxController

PostBoxController

With the PostBoxController you can observe NearbyPostBox‘es.

postBoxController.getNearbyPostBoxes("unitId").collect { nearbyBoxes: List<NearbyPostBox> ->
    // ...
}

Once you got a NearbyPostBox you can open it. For integration reasons you must pass an instance of Application.

postPostController.open(nearbyPostBox, application)
    .onSuccess {
        // ...
    }
    .onError {
        // ...
    }

Our SDK is Kotlin and Coroutines first. So the main API will offer suspend functions or return Flow. We also provide support functions that uses Callback API or LiveData in case you can not use Coroutines (or even Kotlin).