Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: satelliteCount and satellitesUsedInFix always 0 #1479

Closed
3 of 8 tasks
LorenzSchueler opened this issue Apr 14, 2024 · 4 comments · Fixed by #1490
Closed
3 of 8 tasks

[Bug]: satelliteCount and satellitesUsedInFix always 0 #1479

LorenzSchueler opened this issue Apr 14, 2024 · 4 comments · Fixed by #1490
Assignees
Labels
P2 Important issues not at the top of the work list. type: documentation Update to the documentation type: enhancement New feature or request

Comments

@LorenzSchueler
Copy link
Contributor

LorenzSchueler commented Apr 14, 2024

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Linux
  • macOS
  • Web
  • Windows

Steps to reproduce

  1. enable GPS
  2. allow all required permissions
  3. start location stream (getPositionStream)

Expected results

Once the phone has a GPS fix, satelliteCount and satellitesUsedInFix should be > 0.
To verify that the phone has a GPS fix, I use the app GPS Status (which also shows the total number of satellites and the number of satellites used for the fix).

Actual results

both satelliteCount and satellitesUsedInFix are always 0

Version

geolocator: 11.0.0
geolocator_android: 4.5.4

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.19.3, on Debian GNU/Linux trixie/sid 6.6.15-amd64, locale en_US.UTF-8)
    • Flutter version 3.19.3 on channel stable at /home/lorenz/.flutter-git/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ba39319843 (5 weeks ago), 2024-03-07 15:22:21 -0600
    • Engine revision 2e4ba9c6fb
    • Dart version 3.3.1
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/lorenz/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at:
      /var/lib/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio/jbr/bin/ja
      va
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /usr/bin/chromium

[✓] Linux toolchain - develop for Linux desktop
    • Debian clang version 16.0.6 (20)
    • cmake version 3.28.3
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[!] Android Studio (version unknown)
    • Android Studio at
      /var/lib/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to determine Android Studio version.
    • android-studio-dir =
      /var/lib/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.88.0)
    • VS Code at /var/lib/flatpak/app/com.visualstudio.code/x86_64/stable/active/files/extra/vscode
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • Mi MIX 2 (mobile) • b153e0d6 • android-arm64  • Android 14 (API 34)
    • Linux (desktop)   • linux    • linux-x64      • Debian GNU/Linux trixie/sid 6.6.15-amd64
    • Chrome (web)      • chrome   • web-javascript • Chromium 123.0.6312.105 built on Debian
      trixie/sid, running on Debian trixie/sid

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
@TimHoogstrate TimHoogstrate self-assigned this Apr 15, 2024
@TimHoogstrate
Copy link
Contributor

Dear @LorenzSchueler,

Can you send us your LocationSettings?

Kind regards,

@TimHoogstrate TimHoogstrate added the status: needs more info We need more information before we can continue work on this issue. label Apr 22, 2024
@LorenzSchueler
Copy link
Contributor Author

Sure

AndroidSettings(
  forceLocationManager: true,
  foregroundNotificationConfig: const ForegroundNotificationConfig(
    notificationTitle: "Tracking",
    notificationText: "GPS tracking is active",
    color: Colors.red,
    notificationIcon: AndroidResource(name: "notification_icon"),
    setOngoing: true,
    enableWakeLock: true,
  ),
);

@github-actions github-actions bot removed the status: needs more info We need more information before we can continue work on this issue. label Apr 22, 2024
@TimHoogstrate
Copy link
Contributor

Dear @LorenzSchueler,

Only when you set the forceLocationClient to false your data will be enriched with NMEA data. I'll label this as an enhancement, because it seems that this is not well documented.

Kind regards,

@TimHoogstrate TimHoogstrate added type: enhancement New feature or request type: documentation Update to the documentation P2 Important issues not at the top of the work list. labels Apr 24, 2024
@LorenzSchueler
Copy link
Contributor Author

Thanks for looking into this.
Unfortunately even if I set forceLocationManager: false (and using a phone with Google Play Services) both numbers are still 0.
I'm currently using the package location but I'd like to switch to geolocator. However the location package is able to provide the number of satellites (even without Google Play Services, hence probably using the LocationManager interface).

@Wackymax Wackymax mentioned this issue Apr 25, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Important issues not at the top of the work list. type: documentation Update to the documentation type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants