Android foreground service types declared correctly
Why it matters
Android 14 (API 34) made android:foregroundServiceType a hard requirement — a service that starts as a foreground service without a declared type throws a MissingForegroundServiceTypeException at runtime and crashes immediately on all Android 14+ devices. As of 2026, Android 14+ accounts for the majority of active Android installs. This is not a review rejection issue; it is a production crash that manifests the moment a user's device upgrades to Android 14. Libraries that depend on foreground services — audio players (react-native-track-player), background location (react-native-background-geolocation), and background sync (expo-background-fetch) — are all affected.
Severity rationale
Low as a submission issue because Google Play does not catch it pre-publication, but the runtime crash on Android 14+ devices makes it a production reliability issue at scale.
Remediation
Add android:foregroundServiceType to each foreground service in android/app/src/main/AndroidManifest.xml:
<service
android:name=".TrackPlayerService"
android:foregroundServiceType="mediaPlayback"
android:exported="false" />
Add the corresponding permission declaration above <application>:
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
For Expo Managed Workflow, use a config plugin in app.config.ts to inject the service type attribute, since app.json does not expose this field directly. Test on an Android 14 emulator (API 34) or physical device after making the change — foreground service crashes reproduce immediately in development.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the App Store Metadata & Listing Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- external · android-foreground-service-types-api34 — Android Developer Docs — Foreground Service Types (API 34+)
Taxons
History
- 2026-04-18·v1.0.0·Initial import from app-store-metadata-listing·automated