Skip to content

stopWithTask="true" not working #359

Open

Description

@erythana

Hello,

i am trying to kill my foreground service (and its notification) when the app terminates (swipe up in recent apps) on Android.
However, when doing so, the notification is still shown.

Can someone please help me find out why?
sdk: '>=3.8.1 <4.0.0'
flutter: ">=3.0.0"
flutter_foreground_task: ^9.1.0

I have this set in my android.manifest

<application>
<!-- some stuff-->
<service 
            android:name="com.pravera.flutter_foreground_task.service.ForegroundService"
            android:stopWithTask="true"
            android:foregroundServiceType="dataSync"
            android:exported="false" />

I also tried to dispose it, use Riverpods dispose and the LifecycleObserver to no avail (seems to not get executed on detach)

Thank you

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions