[activity_recognition_flutter 4.0.4] Foreground service always starts
Device / Emulator and OS
On Android only.
Describe the bug
Passing along the argument runForegroundService = false still results in a foreground service. This is because the argument in ActivityRecognitionFlutterPlugin.java:87 is ignored. I fixed this in PR #408 .
To Reproduce
Run the plugin example and change
void _startTracking() {
activityStream =
activityRecognition.startStream(runForegroundService: false);
activityStream.listen(onData);
}
Expected behavior
Activity recognition without a foreground service
Actual behavior
A foreground service started running
I fixed this issue in #404 .
I noticed that too, thanks for the fix! Yet, I wanted to create a separate issue and PR in case your entire PR would be rejected and then this issue would be forgotten.
Nice, I mention my PR bcz I add some extra features (Title and body for foreground notification) and fix your mentioned bug,so people can use it. I will be happy to contributing together on it :)
PR is merged, maybe close this?