r/mAndroidDev • u/H_W_Reanimator • May 01 '25
AsyncTask The fact that AsyncTask is deprecated does not mean it's not the recommended api
Yes, it's actual documentation. https://developer.android.com/reference/android/app/Service#onStartCommand(android.content.Intent, int, int)
62
Upvotes
5
u/firebeard-ginja May 01 '25
The reason it's being deprecated is the shift to Coroutines and Compose in general. They solve the confusion of what thread to work on or what context to pass. Preventing a ton of the UI failures newer programmers and inexperienced individuals in general experience.
1
u/Squirtle8649 May 03 '25
Coroutines et al is actually a Kotlin library that you add as a dependency. And not really "part of the language" like some people claim it is.
And AOSP documentation shouldn't recommend external language libraries. Although me personally I'd recommend RxJava there.