Keep these things in mind when using ViewModel in your application
Don't let ViewModels know about Android framework classes. (A general rule of thumb is to make sure there are not(android.) imports in your ViewModels(with an exception like android.arch.)
Keep the logic in activities and Fragments to a minimum.
Av...
surajbahadur.hashnode.dev1 min read