`Day31` - Finished Lesson9 ◦ Room db review (<...
# 100daysofkotlin-2021
j
Day31
• Finished Lesson9 ◦ Room db review (doc) ◦ Repository & Offline caching ◦ WorkManager ▪︎ Background thread(ex. network things) vs. Background works (When app is not running or in background. / ex. upload logs, process data, upload metrics, pre-fetch contents) • Background work works in background thread ▪︎ Constraints should be specified (When to work / ex. charging, device idle, on wifi, etc.) ▪︎ Efficient battery usage (Optimize constraints for background works --> Let it use less cpu, disk. low network. schedule to run rarely. / Ex. prefetching done nightly) ▪︎ Work request (periodic / ) • WorkManager.getInstance.enqueu() - Schedule work • Etc. ◦ (recap) Transformations.map - converts one live data to another ◦ (recap) <scope>.launch{} --> creates coroutine
Self-Comment
• Recalling that the main reason I had a hard time yesterday was because I didn’t review data binding part in the right time. I just stopped lesson 9 and reviewed the Room db part. This time, I didn’t do rough googling in korean, but instead just read the official android document and took notes by hand. Much better, much clearer. • Must review data binding in this way too.. (Goal till this weekend.) • Understand dependency injection thing --> Goal: understand this sentence thoroughly ” _Make your repo take a VideosDatabase constructor parameter, this way you won’t have any dependencies on Context in your repository (so called dependency injection)._”
Goals Tomorrow
• Halfway thru Lesson 10 • Check on data binding, dependency injection (link) • But most importantly, having a nice first day of work..!
🔥 1
b
https://developer.android.com/training/dependency-injection/manual?authuser=1 This has some good explanation on DI. Understand what is referred to as a dependency and it'll all come together
j
Ohh I didn’t check it yet but that’s exactly what I need.. ” Understand what is referred to as a dependency and it’ll all come together”, so I’ll put that into tomorrow’s to-do. Thanks Bryannn