In recent workmanager_android versions, the Android manifest always declares:
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SHORT_SERVICE"/>
and merges:
android:foregroundServiceType="dataSync|shortService"
onto androidx.work.impl.foreground.SystemForegroundService.
This causes Google Play Console to ask for a foreground service declaration and a demonstration video for FOREGROUND_SERVICE_DATA_SYNC, even when the app does not use Workmanager for any user-visible data sync or foreground-service workflow.
Our use case is simple periodic local maintenance:
- Schedule a periodic task with
registerPeriodicTask.
- Clean old local scan history stored on device.
- No upload/download.
- No backup/restore.
- No server sync.
- No explicit
ForegroundServiceConfig.
- No user-visible foreground service feature.
Because the permission is declared by the plugin manifest unconditionally, Play Console treats the app as using FOREGROUND_SERVICE_DATA_SYNC.
Would it be possible to make these foreground-service permissions/service types opt-in instead of always merged?
Possible solutions:
- Do not declare
FOREGROUND_SERVICE_DATA_SYNC / FOREGROUND_SERVICE_SHORT_SERVICE unless the app explicitly enables foreground service support.
- Provide manifest placeholders to disable these declarations.
- Split foreground-service support into a separate Android manifest entry or plugin configuration.
- Document the recommended way for apps to remove these permissions safely when they only use normal background WorkManager tasks.
Expected behavior:
Apps using Workmanager only for regular background tasks should not be forced to declare FOREGROUND_SERVICE_DATA_SYNC in Play Console.
Actual behavior:
The permission is included in the final merged manifest because workmanager_android declares it unconditionally.
For now, we had to pin older versions:
workmanager: 0.9.0+3
dependency_overrides:
workmanager_android: 0.9.0+2
workmanager_apple: 0.9.1+2
workmanager_platform_interface: 0.9.1+1
This removes the data sync permission, but it is not a good long-term solution.
Thanks.
In recent
workmanager_androidversions, the Android manifest always declares:and merges:
onto
androidx.work.impl.foreground.SystemForegroundService.This causes Google Play Console to ask for a foreground service declaration and a demonstration video for
FOREGROUND_SERVICE_DATA_SYNC, even when the app does not use Workmanager for any user-visible data sync or foreground-service workflow.Our use case is simple periodic local maintenance:
registerPeriodicTask.ForegroundServiceConfig.Because the permission is declared by the plugin manifest unconditionally, Play Console treats the app as using
FOREGROUND_SERVICE_DATA_SYNC.Would it be possible to make these foreground-service permissions/service types opt-in instead of always merged?
Possible solutions:
FOREGROUND_SERVICE_DATA_SYNC/FOREGROUND_SERVICE_SHORT_SERVICEunless the app explicitly enables foreground service support.Expected behavior:
Apps using Workmanager only for regular background tasks should not be forced to declare
FOREGROUND_SERVICE_DATA_SYNCin Play Console.Actual behavior:
The permission is included in the final merged manifest because
workmanager_androiddeclares it unconditionally.For now, we had to pin older versions:
This removes the data sync permission, but it is not a good long-term solution.
Thanks.