-
Notifications
You must be signed in to change notification settings - Fork 509
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
onUserLocationUpdated not firing (Android, v0.9.0). #444
Comments
We have exactly the same problem. On iOS @thomfra Did you ever find a solution to the problem? |
Exactly the same here ! Any solutions ? Or the best is to use another solution to track the user position on Android ? (Pitty) |
@n00bsys0p I fork the project and modify MapboxMapController like this : On line 315 i replace the block by :
Obviously the permission need to be granted before this call, so ensure the permission is granted before call the map initialization |
Can you be more specific ? what file (java, dart), what function ? I have the same issue. When I change location permission on Android 9, the permission do not propagate. So, we need to restart the app to make it work. |
The android/MapboxMapController.java file ! But you need to granted location permission before the display of the map ;) |
@Vivalemuc thx for replying quickly, kind of you... Correct us if im wrong and for those future dev coming meeting the same bug:
By doing that, the app crashes !! |
Look at my fork : You can try it ;) |
Not working here ! Thx a lot @Vivalemuc for sharing and answering. I'll dig it and let people know here when I found out. For sure, it is not related to the plugin flutter-permission-handler . The |
Last answer : On your pubspec.yaml put this :
The plugin is working properly for me on fluter dev 1.26... |
Hi @tobrun, Litlle by little, devices are updating to android 10 and even 11. The permission handling is getting more complicated with more choices: check below HOW IT EVOLVES. From android 9, we went from simple location permission to:
Do you think you can give us a clue on how to handle the permission change while the app is running without crashing ? |
Has this ever been picked up? I'm using the latest version 0.12.0 and still have the same issue. This makes it pretty much un-usable on Android. |
* Fix onUserLocationUpdated not firing on android (see flutter-mapbox-gl/maps#444) * FIX SIGABRT when location permission is missing Co-authored-by: Vincent Berthet <vincent@web-74.com>
in MapboxMap widget, myLocationEnabled parameter should be set as false when creating the screen. you can set it to true after creating the map by using onMapCreated function. then onUserLocationUpdated function works normally.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I am not getting any updates on position when my app is starting. However, when I turn off and on the screen again, the callbacks are firing as expected. Anyone else experiencing this?
On iOS on the other hand it works like a charm.
The text was updated successfully, but these errors were encountered: