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

[Question]: Position from getPositionStream() has 0 altitude #1412

Closed
3 of 8 tasks
Velek opened this issue Jan 26, 2024 · 5 comments
Closed
3 of 8 tasks

[Question]: Position from getPositionStream() has 0 altitude #1412

Velek opened this issue Jan 26, 2024 · 5 comments
Labels
P1 High-priority issues at the top of the work list. platform: android Issue is related to the Android platform. type: bug Something isn't working

Comments

@Velek
Copy link

Velek commented Jan 26, 2024

Please check the following before submitting a new issue.

Please select for which platform(s) you need help

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

Your question

I have been using geolocator for quite a while, but after I just did a flutter upgrade, and now the altitude I get from listen()ing to getPositionStream() is always returning 0 for the altitude in the closure, even though there are more than 10 or 20 satellites in solution. The position I'm getting makes sense.
Using the following location settings:
locationSettings = AndroidSettings(
useMSLAltitude: true,
accuracy: LocationAccuracy.bestForNavigation,
distanceFilter: 0,
forceLocationManager: true,
intervalDuration: const Duration(seconds: 0),
//(Optional) Set foreground notification config to keep the app alive
//when going to the background
foregroundNotificationConfig: const ForegroundNotificationConfig(
notificationText:
"Marble Navigator will continue to receive your location even when you aren't using it",
notificationTitle: "Running in Background",
enableWakeLock: true,
));

Version

10.1.0

@andreastambazzi
Copy link

i have the same issue

#1414

@ken-salterdiazsolutions

This all of a sudden started happening to me. Altitude, speed and heading are all 0, but I do get lat and lon updated.

@nilskntl
Copy link

Is this a known issue? I have just switched to geolocator. With the Location package everything worked fine.

@Wackymax
Copy link
Contributor

Wackymax commented Jan 28, 2024

Fixed in #1415

Use this to get the fix while we wait for the PR process:

dependency_overrides:
  geolocator_android:
    git:
      url: https://github.com/Wackymax/flutter-geolocator.git
      path: geolocator_android
      ref: 135277e44e8283bae5473691324405fe360c844e

@mvanbeusekom mvanbeusekom added type: bug Something isn't working platform: android Issue is related to the Android platform. P1 High-priority issues at the top of the work list. labels Jan 29, 2024
@TimHoogstrate
Copy link
Contributor

Fixed in #1415

Use this to get the fix while we wait for the PR process:

dependency_overrides:
  geolocator_android:
    git:
      url: https://github.com/Wackymax/flutter-geolocator.git
      path: geolocator_android
      ref: 135277e44e8283bae5473691324405fe360c844e

The pr is merged, I'll close this issue. Feel free to reopen when needed op open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High-priority issues at the top of the work list. platform: android Issue is related to the Android platform. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants