This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
initializeUIElements() | |
with (viewModel) { | |
initialize(this@HomeActivity) | |
initializeStyle(theme = currentTheme) | |
isCoordinateAvailable.observe(this@HomeActivity, Observer { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun initializeManagers(activity: Activity) { | |
analyticsManager = AnalyticsManager(activity) | |
locationKitManager = LocationKitManager(activity) | |
mapKitManager = MapKitManager() | |
siteKitManager = SiteKitManager(activity, BuildConfig.HMS_API_KEY) | |
// For testing purposes | |
analyticsManager?.sendEvent("XX", Bundle().apply { | |
putString("TestProperty1", "TestValue1") | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val appModule = module { | |
// Data Sources | |
single { DiskHealthInstitutionDataSource() } | |
single { RemoteHealthInstitutionDataSource() } | |
// Repositories | |
single { HealthInstitutionRepository(get(), get()) } | |
viewModel { HomeViewModel(get(), get()) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
startKoin { | |
androidLogger() | |
androidContext(this@MyApplication) | |
modules(appModule + networkModule) | |
} |
NewerOlder