JungIn Choi
04/14/2021, 10:32 AMDay31
• 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..!Bryan L
04/14/2021, 12:50 PMJungIn Choi
04/14/2021, 2:22 PM