Generally it’s not a good idea to pass context instances like Activities or Services to ViewModel.
You can safely pass Application (context) instance there.
l
louiscad
04/26/2020, 9:37 AM
This is Kotlin Slack, not even in the #C0B8M7BUY channel…
Look at the ViewModel docs, passing applicationContext as constructor parameter is already supported.
a
Absar
04/26/2020, 3:46 PM
@louiscad I have deleted the message thanks for correction