I have just started using MVVM in android using kotlin. I have created an Android Service which is just fetching user location. This service runs constantly on background and uses FusedLocationApi to fetch the location. I have been reading articles of using background services with MVVM. The most helpful article I found is this Android Service MVVM communicaton. It says that you have to use repository when android service and view model communicates. But I have also found articles that says that do no use Android Framework classes in View Model (Do not use Android Classes in View Model). I am totally confused that how you communicate android services with activity in MVVM. Either we have to use repository for it or how we can implement it.
Any help will be appreciated,