My configuration
<service
android:name="com.pravera.flutter_foreground_task.service.ForegroundService"
android:foregroundServiceType="dataSync|microphone|mediaPlayback"
android:stopWithTask="true"
android:exported="false" />
I hope that the task stops after the APP is killed. In most cases, it's normal, but I've tested that on the pixel4 and most Samsung models, the task still exists when the APP is killed in the background, and the APP cannot be completely killed