Skip to content
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

[Android] Remove AndroidServiceStartType and update docs #2481

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Levi-Lesches
Copy link
Contributor

@Levi-Lesches Levi-Lesches commented Dec 2, 2024

See #2479 for details on why this was needed (the option wasn't doing anything to begin with)

Fixes #2479
Fixes #2446
Fixes #2298
Fixes #2407

@Levi-Lesches
Copy link
Contributor Author

Seems the CI is failing because the example app is still using the old plugin syntax. I can open a PR for that sometime soon

@EPNW-Eric
Copy link

Looks good to me 👍

@martin-bertele
Copy link
Contributor

Seems the CI is failing because the example app is still using the old plugin syntax. I can open a PR for that sometime soon

fixed in here
#2482

@leaf-node
Copy link

Wait, I think we shouldn't remove the AndroidServiceStartType option completely, because there are two valid values for this setting: the START_NOT_STICKY and START_REDELIVER_INTENT. The first would cause the foreground service to stop entirely if the system needs to pause that activity. And the latter would schedule the foreground service to resume when resources are available, correct? I don't think it's right to only allow use of the START_NOT_STICKY mode, because many people may want their notifications to persist.

If a value has to be hard-coded, it should be the START_REDELIVER_INTENT option so foreground services will continue to be reliable on Android. But I can see a use for both, so I suggest keeping the option in place, setting the default to START_REDELIVER_INTENT, and removing the START_STICKY option, because that one is not supported by this library.

@Levi-Lesches Levi-Lesches marked this pull request as draft December 3, 2024 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment