-
Notifications
You must be signed in to change notification settings - Fork 837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ForegroundServiceStartNotAllowedException Crash Despite Fallback Mechanism in v2.20.6 #1201
Comments
Bumping this as this error is still occurring on 2.20.7. Logs from Crashlytics from our production:
Android Version 14 is only effected for us. Replication steps are the same as above. Devices are Samsung and Google. S24, 23 Ultra, Pixel 8, 7 and 6 for examples. Version 2.20.6 on production, 2.20.7 on staging. Both having similar issues. |
Could this be related to https://issuetracker.google.com/issues/307329994 and needing to add in more permission settings with ServiceCompat? |
We're also having the same issue w Android 14 devices (targeting Android 14) |
Issue Description
We are encountering a
ForegroundServiceStartNotAllowedException
in our application when using theorg.altbeacon:android-beacon-library:2.20.6
. According to the documentation, starting with library version 2.19.5-beta6, the library should handle this exception by falling back to using the Job Scheduler for scans when starting a foreground service is not allowed by the operating system. However, we are still experiencing crashes related to this issue.Stack Trace
ForegroundServiceStartNotAllowedException: startForegroundService() not allowed due to mAllowStartForeground false ...
Expected Behavior
According to the documentation, the library should catch the
ForegroundServiceStartNotAllowedException
and use the Job Scheduler as a fallback, resuming the use of a foreground service when the app returns to the foreground.Actual Behavior
Despite using version 2.20.6, the application is crashing due to the
ForegroundServiceStartNotAllowedException
, which suggests that the fallback mechanism to the Job Scheduler may not be working as intended.Steps to Reproduce
org.altbeacon:android-beacon-library:2.20.6
into the application.ForegroundServiceStartNotAllowedException
.Additional Information
org.altbeacon:android-beacon-library:2.20.6
Documentation Reference
The text was updated successfully, but these errors were encountered: