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

My background service stops after clicking the recent apps close button on Android 13 #465

Open
Lingeshwaran78 opened this issue Aug 7, 2024 · 1 comment

Comments

@Lingeshwaran78
Copy link

Lingeshwaran78 commented Aug 7, 2024

W startForegroundService() not allowed due to mAllowStartForeground false:
service com.example.helloworld/id.flutter.flutter_background_service.BackgroundService

Is there any extra permission I need to get?

Device: Xiaomi note 11 with android 13

@Lingeshwaran78 Lingeshwaran78 changed the title My background service stops after clicking the recent apps close button My background service stops after clicking the recent apps close button on Android 13 Aug 7, 2024
@Henrikkee
Copy link
Contributor

I have a Xiaomi Note 12 with Android 13 and I usually experience the same problem. More recently, all brands that use some modified Android interface have something that kills foreground services. This website shows some workarounds: dontkillmyapp

In Xiaomi, I usually enable auto-start in the settings menu. There isn't an option to auto-activate this setting, so you need to trust the user to do it manually. There is a library that you can use to check if auto-start is enabled, but it only checks; it does not enable it for you.

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

No branches or pull requests

2 participants