Application designed and based on the tutorial from Philipp Lackner: https://www.youtube.com/@PhilippLackner/playlists.
- Dagger-Hilt
Basic use of the dagger-hilt library in simple examples.
- @HiltAndroidApp
- @HiltViewModel
- @AndroidEntryPoint
- @Module
- @InstallIn(SingletonComponent::class)
- @Binds
- @Provides
- @Singleton
- @Named("someUniqueName")
You can also use:
- @InstallIn(ActivityComponent::class)
- @InstallIn(ViewModelComponent::class)
- @InstallIn(ActivityRetainedComponent::class)
- @InstallIn(ServiceComponent::class)
Injecting into constructor
- @Inject constructor
The application is just a basic example for practicing the most used dagger-hilt annotations.