Periodic library sync can't start its foreground notification on Android 12+
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the periodic MediaImportWorker and its setForeground call, then compare it with the expedited import work added in #1027 and the device steps in docs/testing/device-checks.md. First choose between handing off to the expedited unique work and dropping setForeground for background syncs, since the issue leaves that open. Done means the chosen path runs on API 31+ without ForegroundServiceStartNotAllowedException, verified on a device.
Written by the indexing model from the issue text.
Description
Follow-up to #1027. Sync now now runs as expedited WorkManager work with a dataSync foreground notification, but the periodic MediaImportWorker path is unchanged: it calls setForeground from a plain (non-expedited) periodic job, which Android 12+ refuses with ForegroundServiceStartNotAllowedException; the worker only logs it. Forcing the job 3x on an emulator (cmd jobscheduler run -f) showed no notification.
Consequence: a long periodic sync has no foreground protection and no progress notification on API 31+. Options: have the periodic worker hand off to the expedited unique import work, or accept no notification for background syncs and drop the setForeground call there. Needs a device check either way (docs/testing/device-checks.md has the #1027 lines).
- Dominant language
- Kotlin
- Stars
- 229
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from timusus/Shuttle2
-
bug design impact:U1 P3 reach:R2 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
enhancement impact:U1 later P3 reach:R2 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
impact:U1 owner reach:R1 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 Half a day Newbie friendliness 45/100
-
idea
Difficulty 5/5 Over a week Newbie friendliness 12/100
All issues in timusus/Shuttle2
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
SLNE-Development/surf-chat#134 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100