Skip to content

Instantly share code, notes, and snippets.

@barbeau
Created August 12, 2021 15:08
Show Gist options
  • Save barbeau/cdf271764647a7f9de909d8cb13c393b to your computer and use it in GitHub Desktop.
Save barbeau/cdf271764647a7f9de909d8cb13c393b to your computer and use it in GitHub Desktop.
Flow - lighweight architecture article - Data Module
/**
* Configuration for DI on the repository and shared location manager
*/
@Module
@InstallIn(SingletonComponent::class)
object DataModule {
@Provides
@Singleton
fun provideSharedLocationManager(
@ApplicationContext context: Context
): SharedLocationManager =
SharedLocationManager(context, (context.applicationContext as LocationApplication).applicationScope)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment