Skip to Content

RepoBuilder

class RepoBuilder

This repo works like a monitor, allowing thread-safe access to the singleton variables. Obviously you should have only one instance of this variable if you one the singleton across the whole app

Constructors

RepoBuilderconstructor()

Functions

buildLocationRepository

fun buildLocationRepository(fusedLocationProviderClient: Context, beaconContext: Context, repoScope: CoroutineScope, parentPlaceId: String? = null, beaconsSimulatedIds: List<String>? = null, useMotionDetection: Boolean = false)

This method would build the locationMergedRepository for be used here or in another component. There should be only one instance of the locationMergedRepository in the lifecycle of the app

buildPositionStatusRepository

suspend fun buildPositionStatusRepository(context: Context, parentPlaceId: String? = null, beaconsSimulatedIds: List<String>? = null, useMotionDetection: Boolean = false, useCompassSensors: Boolean = false, route: SdkRoute?, repoScope: CoroutineScope)

Types: SdkRoute

Similar to buildLocationRepository but this time for the router status repository. There should be only one instance of the routingStatusRepository in the lifecycle of the app

buildRoutingStatusRepository

fun buildRoutingStatusRepository(locationMergedRepository: LocationMergedRepository, compassDataSource: CompassDataSource? = null, route: SdkRoute?, repoScope: CoroutineScope)

Types: LocationMergedRepository, CompassDataSource, SdkRoute

Similar to buildLocationRepository but this time fro the router status repository. There should be only one instance of the routingStatusRepository in the lifecycle of the app

getLocationMergedRepoReference

fun getLocationMergedRepoReference(): LocationMergedRepository?

Types: LocationMergedRepository

getRoutingStatusRepoReference

fun getRoutingStatusRepoReference(): RoutingStatusRepository?

Types: RoutingStatusRepository

Last updated on