Component used: android.arch.work:work-runtime android.arch.work:work-firebase Version used: Devices/Android versions reproduced on: Reproducible on API 21 emulator with google play services
If OneTimeWorkRequest setInitialDelay() method is set to WorkRequest.MIN_BACKOFF_MILLIS app will crash at runtime with com.firebase.jobdispatcher.ValidationEnforcer$ValidationException: JobParameters is invalid: Initial backoff must be at least 30s
Therefore, I think WorkRequest.MIN_BACKOFF_MILLIS should be at least 30 seconds, or, perhaps, you could create a separate constant for the initial delay and crash WorkManager always if initial delay is less than 30 seconds, no matter what API level.
Description
android.arch.work:work-runtime
android.arch.work:work-firebase
Version used:
Devices/Android versions reproduced on:
Reproducible on API 21 emulator with google play services
If OneTimeWorkRequest setInitialDelay() method is set to WorkRequest.MIN_BACKOFF_MILLIS app will crash at runtime with
com.firebase.jobdispatcher.ValidationEnforcer$ValidationException: JobParameters is invalid: Initial backoff must be at least 30s
Therefore, I think WorkRequest.MIN_BACKOFF_MILLIS should be at least 30 seconds, or, perhaps, you could create a separate constant for the initial delay and crash WorkManager always if initial delay is less than 30 seconds, no matter what API level.