Kotlin Fundamentals: Repository and WorkManager Quiz Return to pathway Which component in the Android Architecture Components is responsible for keeping the offline cache up-to-date and getting data from the network? ViewModel LiveData Repository Activities What is the best way to save structured data on the device file system for offline caching? Room Files Shared preferences Retrofit caching The Transformations.map() converts one LiveData into another ___. ViewModel LiveData Repository DAO object When implementing offline caching, which one of the following strategies is a good example of the separation of concerns principle? Create separate classes to represent the network, domain, and database objects. Create a single class to represent the network, domain, and database objects. Create a single class to represent the network and domain objects, and another class to represent the database object. Create a single class to represent the network object and another class to represent the database and domain objects. Which of the following are concrete implementations of the WorkRequest class? Select all that apply. Choose as many answers as you see fit. ListenableWorker class is for runtime tasks. OneTimeWorkRequest class is for one-off tasks. PeriodicWorkRequest class is for periodic work, work that repeats at intervals. RxWorker class is an interoperability Worker implementation for one-off tasks. Which of the following classes does the WorkManager use to schedule the background task on API 23 and higher? Only JobScheduler BroadcastReceiver and AlarmManager AlarmManager and JobScheduler Scheduler and BroadcastReceiver Which API do you use to add constraints to a WorkRequest? setConstraints() addConstraints() setRequiresCharging(true) addConstraintsToWorkRequest(true) Submit answers error_outline An error occurred when grading the quiz. Please try again.