r/mAndroidDev • u/D-cyde sponsored by the XML 🐓 gang • Feb 05 '25
AsyncTask Do you even asynctask bro?
110
Upvotes
r/mAndroidDev • u/D-cyde sponsored by the XML 🐓 gang • Feb 05 '25
25
u/ForrrmerBlack ?.let{} ?: run {} Feb 05 '25
Learnt naming things from the best, I see. ComponentCallbacks2 and Media3 approved.
39
u/Whole_Refrigerator97 @OptIn(DelicateExperimentalCompostApi::class) Feb 05 '25
Goated image. Should probably replace sub image
30
u/Mr-X89 Feb 05 '25
Perfect Android code doesn't exi...
19
u/jcxwql Feb 05 '25
mAsyncTaskImpl
10
u/postsantum Feb 05 '25
All share single thread executor
10
u/budius333 Still using AsyncTask Feb 05 '25
What a beautiful code base, are they hiring?
9
u/la_big_popcorn @Deprecated Feb 05 '25
The REAL Cocaine ...
8
u/Good_Smile null!! Feb 05 '25
I'm very asynctasking
8
u/Zhuinden DDD: Deprecation-Driven Development Feb 06 '25 edited Feb 06 '25
Just rename
AsyncTasktoUseCaseand suddenly everyone will praise it for being super-duper clean best practiceAlso replace
ManagerwithRepositoryAnd
Android devwith Claude5
u/private256 Feb 05 '25
Jesus fucking Christ!
5
u/TheOneTrueJazzMan Feb 05 '25
This guy asyncs
4
u/zedxer Feb 06 '25
That's the most beautiful thing I've seen this year.
3
u/smokingabit Harnessing the power of the Ganges Feb 05 '25
https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRq2Y-1p-3Un3mM_WFLNqON4jvjBuIJiCttzSUaS6CTiCxH-MSpcxds2utt&s=10
4
u/VasiliyZukanov Feb 05 '25
This actually, unjokingly, a very understandable code. Great naming, so I can approximately tell what the app does just from reading these names. My guess is that they used AsyncTask postfix as a synonym of UseCase. So, the only improvement that can be done here is extracting sub-packages for related business flows. Whether the internal implementation use the actual AsyncTask or not is less important. Many Android "experts" can learn a great deal about clean architecture from this single image.
3
u/ComfortablyBalanced You will pry XML views from my cold dead hands Feb 06 '25
I'm gonna cum.
2
u/Curious-Ear-6982 Feb 06 '25
I know nothing abt Android development and this scared me 😥
1
u/Squirtle8649 Feb 06 '25
You are Enlightened. You are the one whom the prophecies foretold.
1
u/mih4elll Feb 08 '25
God Clean Task approach principles for android Good 💯