high · M8 · MASVS-PLATFORM-1 · PTKD-REVIEW-PLAY-FGS-TYPE
Foreground service type or permission missing (Android 14+)
Apps targeting Android 14 (API 34) or higher must give every foreground service a type and hold the matching FOREGROUND_SERVICE_<TYPE> permission; otherwise startForeground() throws and the feature crashes. Google Play also asks for a foreground service declaration (with a video) for each type the app uses.
How it is exploited
A fitness app targets API 35 and starts a location-tracking service with startForeground(). The service has no foregroundServiceType, so on Android 14+ the call throws MissingForegroundServiceTypeException and every run crashes. Play also rejects the update because the foreground service declaration in Play Console is missing.
Why it matters
Crashes on Android 14+ devices, and a rejected update until the Play Console declaration is complete.
How to fix it
- List every service you start with startForeground() (including services from SDKs in the merged manifest).
- Give each one android:foregroundServiceType (location, mediaPlayback, dataSync, ...) and request the matching android.permission.FOREGROUND_SERVICE_<TYPE>.
- In Play Console, open App content, Foreground service permissions, and describe each type with a short video of the feature.
- If the work can wait or be interrupted, use WorkManager or a shortService instead of a typed foreground service.
Does your app have this?
PTKD checks your build or your source project for PTKD-REVIEW-PLAY-FGS-TYPE and every other check in this knowledge base.
Scan your appReferences
Related checks (M8)
- JavaScript obfuscation in the build
- Export compliance (ITSAppUsesNonExemptEncryption) not declared
- HealthKit app that also ships an ads SDK
- Hardcoded unlock or promo code
- Purchases SDK configured with an empty or test key
- Purchase screen falls back to made-up prices or 'coming soon' text
- False-urgency copy on a purchase screen
- Hardcoded price on a purchase screen