Question
Android WorkManager without it's foreground service
How are you supposed to setup Android WorkManager, if you would just like to only use it's background service?
USE-CASE: have a PeriodicWorker scheduled to run every 30M, which performs data sync with server, when app is on foreground. Data sync will be < 12 minutes, which seems to be Googles definition for long-running task. Worker won't be calling setForegroundInfo() which hints Android WorkManager that it should be executed in background service.
Problem is that WorkManager includes FOREGROUND_SERVICE permission, when manifest is merged, and that then will let Google Play believe app is using foreground services. Which then leads is submission rejection, due targetSdk 34 requirements.
FOREGROUND_SERVICE permission (and androidx.work.impl.foreground.SystemForegroundService) can be removed using tools:node="remove" from manifest, but is this proper way of telling Google that you'll only need to use background service of WorkManager?