Skip to content

fix: Location.getLocation() not resolving when app location accouracy is not set to Precise #748

@TouseefAQ

Description

@TouseefAQ

When i turn off location accuracy from app setting in ios , getLocation doesn't resolve.Althought i have set location accuracy to LocationAccuracy.low from changeSetting methode.
Similary on Android 7 , user device location is turned off but IslocationServiceEnabled returns true every time. On Android 12 is i turn off precise location off and call getLocation() , getPrecise location request box pops and if i select approximate location , It crashes the app

It should ateast get approximate location.

Steps To Reproduce

Go to ios App setting
Turn off presise
And Try to call GetLocation()

Tested on:

  • Android, 7.1.2 & 12
  • iOS, Iphone 7 , os 15.5

Flutter Doctor v

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.5, on macOS 11.3.1 20E241 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.67.1)
[✓] VS Code (version 1.66.2)
[✓] Connected device (2 available)
! Error: Anas iphone12 is not connected. Xcode will continue when Anas iphone12 is connected. (code -13)
! Error: iPhone is busy: Fetching debug symbols for iPhone. Xcode will continue when iPhone is finished. (code -10)
[✓] HTTP Host Availability

Android 12 - after selecting approximate location
I/Quality (18537): ActivityThread: activityResume delay 76 com.app.myapp 18537
I/Quality (18537): Skipped: false 5 cost 97.524185 refreshRate 0 processName com.app.myapp
E/BLASTBufferQueue(18537): BLASTBufferItemConsumer::onDisconnect()
E/BLASTBufferQueue(18537): BLASTBufferItemConsumer::onDisconnect()
E/BLASTBufferQueue(18537): ViewRootImpl[MainActivity]#0 Applying pending transactions on dtor 1
V/OplusZoomWindowDecorViewHelper(18537): removeZoomView
D/FlutterLocationService(18537): Unbinding from location service.
D/FlutterLocationService(18537): Destroying service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions