flutter_background icon indicating copy to clipboard operation
flutter_background copied to clipboard

I am not getting the persistent notification

Open kgoofori opened this issue 2 years ago • 3 comments

I am not able to get the app running with the persistent notification even after running FlutterBackground.enableBackgroundExecution() successfully.

I am testing on Samsung A51 running android 12.

[✓] Flutter (Channel stable, 3.7.10, on macOS 12.5.1 21G83 darwin-x64, locale en-GB) [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)

environment: sdk: '>=2.18.6 <3.0.0'

dependencies: flutter_background: ^1.2.0

kgoofori avatar Apr 08 '23 11:04 kgoofori

I think this is related to https://github.com/JulianAssmann/flutter_background/issues/69 I'd try the solution by @jakoss to add the service to the AndroidManifset manually

<service android:name="de.julianassmann.flutter_background.IsolateHolderService" android:exported="false" />

Muhammad-Mohsen avatar Apr 19 '23 14:04 Muhammad-Mohsen

<service android:name="de.julianassmann.flutter_background.IsolateHolderService" android:exported="true" />

KhaledYussef avatar Jul 09 '23 09:07 KhaledYussef

Not working here either. I'm using Android 14

flutter_background: ^1.2.0

Aturex1 avatar Dec 19 '23 22:12 Aturex1

Thanks for creating the issue. Can you please upgrade to the new version of the plugin (1.3.0), update your AndroidManifest.xml according to the new README (specifically including the foreground service types). This should fix this issue. If not, please feel free to re-open the issue.

JulianAssmann avatar Aug 15 '24 11:08 JulianAssmann

I was having this issue. I fixed it by requesting Permission.notification manually via the permission_handler package

TNorbury avatar Jul 24 '25 18:07 TNorbury