getLocation() never return if user don't accept to use Google location service
See original GitHub issueDescribe the bug On Android, when user is prompted to enable Google location service, if say “No Thanks”, the getLocation method hangs and never return. No error is throw.
Expected behavior Must return the location or some error if it’s not possible.
Tested on:
- Android, API Level 28, simulator and Moto G device
- iOS, Version 12, simulator and real device (SE). Works fine
Additional logs
- There’s just one log that would indicate something…
W/System (15921): A resource failed to call release.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Unable to get user location in flutter app - Stack Overflow
This is the method I use to get location. Hope it helps. void _getLocation() async { var location = new Location(); try {...
Read more >Requesting access to location in the background
Your app should not request access to location in the background unless it's required. If your app requests access to location in the...
Read more >Request location permissions - Android Developers
... Google Play services for cars · Notifications on Android Automotive OS ... Create and monitor geofences · Detect when users start an...
Read more >Place Autocomplete | Maps JavaScript API - Google Developers
The API does not return results outside this region even if they match the user ... On calling getPlace() on the Autocomplete object,...
Read more >location | Flutter Package - Pub.dev
Remember that the user has to accept the location permission to always allow to use the background location. The Android 11 option to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Workaround:
Hey ! Should be fixed with 2.5.0, please reopen if this still happens 😃 Thanks for your patience 😃