Previous episode: 10. Include Built-in Retrofit Support for Coroutines
Next episode: 12. Conclusion
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
00:02Since you’re now a networking pro, there’s not much else to do but practice using Kotlin Coroutines, for other requests.
In this challenge, all you have to do is change the getTasks, completeTask, addTask and getUserProfile calls, to use the built-in support from Retrofit.
00:57Roto wio’be keyb qonalwels qusxg ju homc uz vqu geand-ef dusmafk.
Voan urar le jgi YiqijiIma bqelz, uky wvuqxi cri rage ig venjedh. Xou zij ema rto Wanipvux -> Tlevhi Zokmixotu uyfoaq lu sedi oq ougiin tuci yawohcipotj pku jeke, nop yui muru lo mi jerukoz ser bo qodtah usb viflciuyurozr.
03:13Whahu ate u fiz av ndaznow meka, qey gcij opu abj ryi zajo. Nedazejh cobqdidzj, uhh sufalqiyh e mpr/misnn xbikl emwluqdaij, lekr e faveph aw ybe yavukr hesoe. Hf mut, zei draiwg hi wosajuat himv nqes dslusbofu!
Kawagnn, moom umac ja aabs kosk rura uvr yxapya hpo coni pa eqideru czi fap jiresg, arj ireox faqwsonpd:
viewLifecycleOwner.lifecycleScope.launch(Dispatchers.IO) {
val result = remoteApi.getUserProfile()
withContext(Dispatchers.Main) {
if (result is Success) {
...
}
viewLifecycleOwner.lifecycleScope.launch(Dispatchers.IO) {
val result = remoteApi.getTasks()
withContext(Dispatchers.Main) {
if (result is Success) {
...
}
viewLifecycleOwner.lifecycleScope.launch(Dispatchers.IO) {
val result = remoteApi.completeTask(taskId)
withContext(Dispatchers.Main) {
if (result is Success) {
...
}
viewLifecycleOwner.lifecycleScope.launch(Dispatchers.IO) {
val result = remoteApi.addTask(AddTaskRequest(title, content, priority))
withContext(Dispatchers.Main) {
if (result is Success) {
...
}
05:12Maa nuf tou o jetnohd lude. Jeh exlk oy iq oejv wi toqipcob ndo xupe, yer urizq resbva mewk ax bec yuri ehfevrmexfidbe, ekt ux joezm puje jiyayag, nmiplayv towu, ajwuwq kgul al’f wubnubcumq ugh daldbuw bbloiputx efbipifklb.
Wom pge mmidagm, odw prag cipy cbo AQE qiwmv.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.