Pick the fix
A 25-minute video upload worker keeps getting stopped. Best fix?
Hint 1 of 1
What lets work run beyond about 10 minutes?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Call setForeground(...) with a dataSync notification to make it long-running
Correct. Long-running workers run in a foreground service WorkManager manages.
Why not the others?
- B Mark it expedited. Expedited is for starting quickly, not running long.
- C Split it into 25 periodic workers. Breaks the upload and adds overhead.
- D Use a background Service. Background services are stopped quickly.