Here is my fun in the Repository that returns me the String Id from the Group name
@Suppress(“RedundantSuspendModifier”)
@WorkerThread
suspend fun fetchGroupId(groupName: String): String {
return groupDao.fetchGroupId(groupName)
}
And this is the function on the ViewModel
fun getGroupId(groupName: String) = scope.launch(Dispatchers.IO) {
groupId = repository.fetchGroupId(groupName)
}
Now I want this group Id on the Activity side what I need to do?