Why AsyncTaskLoader is deprecated in Android P?

2.9k views Asked by At

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

1

There are 1 answers

2
CommonsWare On

Can anyone tell me why they are deprecated

The framework implementation of Loader is deprecated, along with the framework implementation of Fragment.

what alternative should we used instead?

Use the Support Library edition of AsyncTaskLoader.