I have a project, in which I have successfully implemented location tracking feature, and is working perfectly. I am tracking users current location using fused location provider in every 30 seconds.(tracking starts when MainActivity started).
Now I am planning to update that project with newly introduced android architecture components. But I don't know how to implement location tracking with view model.Where is the right place to start location tracking, in MainActivity or Application class? Should I use ViewModel or AndroidViewModel? How to achieve this.