Closed JoseBarreto1 closed 11 months ago
Foreground is necessary for background playback.
Right. However, by default the foreground is enabled, it is only optional for those who want to disable it. I tested my application with the foreground disabled and still had the same experience in the background. This way, this change will not affect any user who already uses the audio_service, this change only allows the foreground to be optionally disabled.
That doesn't address my point, though. If you are trying to solve the ForegroundServiceStartNotAllowedException, this is not the "correct" way to do it, because it violates the policies of the operating system. Even if you propose adding this as an option, Android does not consider it to be correct.
Sorry. But would you know what would affect my app if Android doesn't consider this correct?
The issue that you linked to has a discussion of everything we know.
Avoiding ForegroundServiceStartNotAllowedException when android Disable Foreground is set to true.
Open issue that my PR is fixing: https://github.com/ryanheise/audio_service/issues/994
Pre-launch Checklist
minor
branch OR my change is breaking and lands inmajor
branch.pubspec.yaml
according to the pub versioning philosophy.* DESCRIPTION OF YOUR CHANGE (@your-git-username)
).///
).dart analyze
.dart format
.flutter test
and all tests are passing.