Application (by using @HiltAndroidApp) • ViewModel (by using @HiltViewModel) • Activity • Fragment • View • Service • BroadcastReceiver How DI container works with Hilt
interface MyViewEntryPoint{ fun getMyViewModelFactory(): MyViewModelFactory } private val viewModel by viewModels<MyViewModel>{ EntryPoints.get( context.applicationContext, MyViewEntryPoint::class.java ).getMyViewModelFactory() } How to implement Hilt to ViewModel
Sony products and services are the registered trademarks and/or trademarks of Sony Corporation or its Group companies. Other company names and product names are registered trademarks and/or trademarks of the respective companies.