android6-3 Exercise 2: One-time work and unique policies ===================================================== // Work the user asks for: export all notes now, but only on a charger val export = OneTimeWorkRequestBuilder() .setConstraints(Constraints.Builder().setRequiresCharging(true).build()) .setInitialDelay(10, TimeUnit.SECONDS) .build() WorkManager.getInstance(context).enqueue(export) ExportNotesWorker is a second CoroutineWorker: doWork() reads the notes from the repository, calls exportNotesAsJson and writes the text to a file in the app's files directory, then returns Result.success(). Charging: the emulator's Extended controls have a Battery page with a charger connection setting (general knowledge). Expected: the work stays ENQUEUED while unplugged and runs once charging starts. Report what you see. KEEP against REPLACE (docs): KEEP leaves an already-pending periodic request alone; REPLACE cancels it and starts the new one. For a sync scheduled on every app start, REPLACE would restart the timer each launch so the job might never run; KEEP does not. Code unrun.