diff options
Diffstat (limited to 'androidApp/src/main')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/TrackerApp.kt | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/TrackerApp.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/TrackerApp.kt index 2901dbb..c21cfe1 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/TrackerApp.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/TrackerApp.kt @@ -1,6 +1,7 @@ package mx.trackermap.TrackerMap.android import android.app.Application +import androidx.preference.PreferenceManager import kotlinx.coroutines.DelicateCoroutinesApi import mx.trackermap.TrackerMap.android.details.commands.UnitCommandsViewModel import mx.trackermap.TrackerMap.android.details.information.UnitInformationViewModel @@ -29,13 +30,14 @@ open class TrackerApp : Application() { super.onCreate() val appModule = module { - factory { SessionApi() } - factory { UsersApi() } - factory { DevicesApi() } - factory { PositionsApi() } - factory { CommandsApi() } - factory { ReportsApi() } - factory { GeofencesApi() } + single { getString(R.string.default_server_url) } + factory { SessionApi(get()) } + factory { UsersApi(get()) } + factory { DevicesApi(get()) } + factory { PositionsApi(get()) } + factory { CommandsApi(get()) } + factory { ReportsApi(get()) } + factory { GeofencesApi(get()) } factory { SessionController(get(), get()) } factory { UnitsController(get(), get()) } |