getLoaderManager in Fragments is deprecated

Loaders have been deprecated as of Android P (API 28). The recommended option for dealing with loading data while handling the Activity and Fragment lifecycles is to use a combination of ViewModels and LiveData.ViewModels survive configuration changes like Loaders but with less boilerplate. LiveData provides a lifecycle-aware way of loading data that you can reuse in multiple ViewModels.


getLoaderManager has been deprecated, use LoaderManager getInstance instead:

LoaderManager.getInstance(this).initLoader(0, null, this);