I came to know that getSupportLoaderManager is deprecated. But I want to call:
getSupportLoaderManager().initLoader(0, null, mRecipeLoaderManager);
>
Here you have a brief explanation on how to replace Loaders with ViewModel:
https://developer.android.com/jetpack/arch/viewmodel#loaders
The graphics there are self-explanatory, I think:
For a more thorough explanation, you can read this blog post:
https://medium.com/google-developers/lifecycle-aware-data-loading-with-android-architecture-components-f95484159de4