Aaron Waller
03/28/2022, 4:16 AMildar.i [Android]
03/28/2022, 4:46 AMAaron Waller
03/28/2022, 5:50 AMAaron Waller
03/28/2022, 5:51 AMildar.i [Android]
03/28/2022, 5:54 AMlam bui
03/28/2022, 11:47 AMRonald Wolvers
03/28/2022, 8:43 PM@HiltViewModel
you can inject any class that talks to a DB or does networking in a really convenient way (using @Inject
) and then from your VM you can launch a coroutine that is scoped to your VM's lifecycle using viewModelScope.launch {
and then call back to your UI with a LiveData
. (https://developer.android.com/training/dependency-injection/hilt-android)Ronald Wolvers
03/28/2022, 8:45 PM@ApplicationContext
Patrick Kellison
03/28/2022, 8:53 PM