ForegroundServiceStartNotAllowedException on Android 14 after geofence
Targeting SDK 34 (Android 14). Our app starts a foreground location service from a background geofence callback. On Android 14 devices it crashes: java.lang.ForegroundServiceStartNotAllowedException: startForegroundService() not allowed due to mAllowStartForeground false. Works on Android 13. The docs mention new restrictions but I cannot figure out which exemption applies to geofencing. Anyone dealt with this? The stack trace points at our start call, not at the geofence itself.
4 replies