-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Description:
Step 1: Describe your environment
Unity version: [6000.2.13f1]
Google Mobile Ads Unity plugin version: [10.6.0]
Platform: Android
Target SDK Level: 34 or 35 (Android 14+)
Step 2: Describe the problem : Upon importing the Google Mobile Ads plugin into an empty project and exporting to Android, the plugin automatically injects the android.permission.FOREGROUND_SERVICE permission and the androidx.work.impl.foreground.SystemForegroundService service into the merged manifest.
However, the plugin does not declare an android:foregroundServiceType for this service, nor does it include the type-specific permissions (e.g., FOREGROUND_SERVICE_DATA_SYNC) required by Android 14+.
Impact: Because the service is declared without a type, any attempt by the internal WorkManager to start a foreground task (especially when the app is in the background) results in an immediate SecurityException or ForegroundServiceStartNotAllowedException.
In the Google Play Console, this is being flagged as a "User-Perceived Denial," leading to an alarmingly high denial rate even though the user is never prompted. This negatively impacts app health metrics and discoverability.
Step 3: Steps to reproduce
Create an empty Unity project (no foreground services in manifest).
Import the Google Mobile Ads Unity Plugin.
Build and inspect manifest.
Proposed Solution: The SDK should either:
Remove the requirement for a Foreground Service if it is not strictly necessary for ad delivery (allowing WorkManager to fall back to standard background jobs).
Correctly declare the Service Type (e.g., dataSync) and the corresponding permission in the internal AAR manifests to comply with Android 14+ requirements.