According to Android documentation, AsyncTaskLoader is deprecated in Android P. Can anyone tell me why they are deprecated and what alternative should we used instead?
EDIT - google now recommends using ViewModel instead of Loader that's the reason for their deprecation
The framework implementation of
Loaderis deprecated, along with the framework implementation ofFragment.Use the Support Library edition of
AsyncTaskLoader.