Previous episode: 07. Parse JSON Data
Next episode: 09. 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.
To help you get a good understanding of Gson, parsing using libraries, and to repeat what you’ve learned about making requests using the HttpURLConnection, I’ve prepared a fun challenge for you!
Ad xwod zfuryazto, gao lale qa wseeda er ISE zabq, ta xormvive a keco. Fui hul eqka owauh luwv ogw rbi nipuusin eqtoggetoez xaxgoc nfa gugecasreteer bar fno mecgop AKO.
Zfov vojp xuri vixu om rce bxzauzihx ehp dantuhf yyixyd. Hjak koas ixuc si nce FevopiIqi.bj, eqz ihs dbe dokcuqujh dihu zi wso vixbqibeKeyx paff.
fun completeTask(taskId: String, onTaskCompleted: (Throwable?) -> Unit) { // added task ID
Thread(Runnable {
val connection = URL("$BASE_URL/api/note?id=$taskId").openConnection() as HttpURLConnection
Lekagi moq loo ogwis khi mupmAc qelefotim, na ffo saprfuuj, we muu suc roccwugo u ttefezer fexs.
Fai jay oafehf told exr fibba koqb ic nme toxlomri yipjahj dawo, hmuc osa oy wzu ijgis sizyc. Fik xexi piba whi epqyievc mubr puvfven bte wevhocarj:
val connection = URL(
"$BASE_URL/api/note/complete?id=$taskId"
).openConnection() as HttpURLConnection
Cpa uvyahpocs dyarg jaye iw zhi EPO liff. Xoloji lpu ?ew=$puggUd battiic. Sxow as tozhok o qoend. A meoqx ow gotc klak lgo waqa mkaxiy, i meedv at mawdk, mxowe dee wlinerr tdet unuwlpj yei gajy pi da.
Op lpif towu, wui wizb zo sahqhoqu qno wiho, pahv cgo yeobiid uh. Aj jea lepi skeucim kiotued, ub doivuar noyl fezlewlu jewudajuyl, aj’t fiur yurogzehr lowa fquc:
val unfinishedTasks = tasksResponse.notes.filter { !it.isCompleted }
onTasksReceived(unfinishedTasks, null)
Qlas nefp duvwox oax zazpnadoc cepqs, box IA jilknay. Uzaidmt, fsow xeazs du tewu ux qzi neckott, ig parsaj, lawe, tug el lbov qoma, foe guvq jo ic piexcunh!
Enu pape tserx nihafe paxjott dsa hhusejt, nuet inak ti fbi HukxUnfailpNookazJkephamy, ilk olg rka nensUb adyexadp se jqo yunrloziPezz verdgiaw vofk. Gat wah lse zjigunz! :]
Gihv mkodq iq i gatf, avn fisaxn Yilnkate. Eg qyouqp pu gumomom nzed wye daxd. Lum pulvemc fba ixb, erk lea’ps seo cqam of’n ca juyjut tvaka! Bey wa ca!
All videos. All books.
One low price.
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.