Skip to content

[ANDROID-35] the service is automatically restarted when the time limit is reached #344

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ygor-coelho
Copy link

@ygor-coelho ygor-coelho commented Jun 4, 2025

In Android 35, when the foreground service is of the dataSync type, the execution timeout without the app being called to the foreground is 6 hours.

In the ForegroundService.kt package, onDestroy method,
if !isCorrectlyStopped is false
and !ForegroundServiceUtils.isSetStopWithTaskFlag(this) is false

the service will be automatically restarted, however, generating an error. I will put the prints of the error below

Image

Image

fix: create new param in ForegroundTaskOption dart class

and see this on onDestroy
image

image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant