ITADN

[BUG] AdMob SDK injects FOREGROUND_SERVICE via WorkManager without required Android 14 Service Types, causing high Permission Denial rates

#4092OpenAn4seen 创建于 2026-01-23
P2
A
An4seencommented
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.
4 条评论