flutter-geolocator icon indicating copy to clipboard operation
flutter-geolocator copied to clipboard

[Bug]: foreground service seems to be missing `FOREGROUND_SERVICE_LOCATION` permission

Open CaviarChen opened this issue 1 year ago • 1 comments

Please check the following before submitting a new issue.

Please select affected platform(s)

  • [X] Android
  • [ ] iOS
  • [ ] Linux
  • [ ] macOS
  • [ ] Web
  • [ ] Windows

Steps to reproduce

It seems the locationStream is not stable (i.e. having random pauses) with foreground service. It seems it is due to missing the FOREGROUND_SERVICE_LOCATION permission. I don't know android very well and don't have concrete proof. But it seems to be required per doc and does seem to fix the issue. If this is indeed require, then maybe we should mention it in the doc/installation guide?

(cc: @kuailezhiyuan)

Expected results

Having <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" /> in AndroidManifest.xml.

Actual results

n/a

Code sample

n/a

Screenshots or video

No response

Version

4.5.4

Flutter Doctor output

n/a

CaviarChen avatar Mar 29 '24 15:03 CaviarChen