tezvyn:

How would you implement a constrained photo upload with WorkManager?

Source: developer.android.comintermediate

Tests knowledge of WorkManager constraints and retry policies for deferrable background uploads. A strong answer names OneTimeWorkRequest with Constraints for charging and unmetered network, plus BackoffPolicy for retry.

Tests whether you can configure WorkManager for deferrable, constrained background work that survives process death. A strong answer outlines a OneTimeWorkRequest with Constraints set to require unmetered network and charging, enqueues it with WorkManager, and sets a BackoffPolicy for retry. It should also mention Worker or CoroutineWorker for the upload logic and InputData for passing the URI. Red flag: proposing ForegroundService, AlarmManager, or JobScheduler directly, which forces you to handle constraints and retries manually.

Read the original → developer.android.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

How would you implement a constrained photo upload with WorkManager? · Tezvyn