-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
No location information available,can not get the location #386
Comments
@chao9267 could you provide a little bit more information? Meanly I would be interested in the platform you are on. |
@mvanbeusekom flutter doctor |
Are you testing with Android on the simulator or on a real device? Are the location services turned on? if on the simulator are you actually simulating GPS coordinates? |
I used the 5.1.5 version was normal before, but now it is invalid. It is the same when I switch to the 5.2.1 version. I use the real android phone test,and my app locaiton permission turned on in system setting |
Here is the screenshot for calling method getCurrentPosition
At 2020-02-03 16:31:52, "Maurits van Beusekom" <notifications@github.com> wrote:
Are you testing with Android on the simulator or on a real device?
Are the location services turned on? if on the simulator are you actually simulating GPS coordinates?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I am having a same problem, too. Version 5.1.5 was working fine on my phone. I just upgraded to v5.2.1. Still the same problem (no response from getCurrentPosition) [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) Physical device: iphone 8 (13.3.1) |
Same problem here. The call to On Android: Something weird is that it did seem to work well the first couple of times. I denied permissions from system settings to keep testing. Then, it never worked again. I rebooted the device, the problem persisted. Then I switched to iOS device, and the problem showed up from the very first test. Tried with geolocator 5.2.1 and 5.1.5. I guess it's related to #393 and #375, although in my case changing |
Seeing same issue with geolocate
In my case only reproducible on real android device. No issue on ios for my case. |
The same thing there is no response
|
I was able to fix the issue by adding
<key>NSLocationAlwaysUsageDescription</key>
<string>This app needs access to location when in the background.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This app needs access to location when open and in the background.
</string>
to my Info.plist file. You guys should check if the above codes are added.
…On Wed, Mar 25, 2020 at 8:02 AM Valeh ASADLI ***@***.***> wrote:
The same thing there is no response
void getLocation() async { Position position = await Geolocator()
.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
print(position); }
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#386 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AELYL4FI4EEHNNJ6ZP2WMNDRJIMIDANCNFSM4KPA5CPQ>
.
|
using ACCESS_FINE_LOCATION instead of ACCESS_COARSE_LOCATION can resolve my error on android (using simulator). |
I am using Pixel 2 having Android 10 version to test this feature of getting current location, but i am not able to fetch the location .The issue that i am facing is that location icon is not getting turned on automatically after providing location permission. User has to tap on the location icon manually in order to provide his location which is not the expected behavior. Following are the steps that are getting performed after app installation:-
I am currently using Flutter 1.18.0 • channel dev Geolocator plugin version :- Code:-
|
I have same issue when run at android 9 device (in debug mode), at emulator running perfect.
no error displayed.. I am currently using Flutter 1.18.0-6.0.pre64 |
After debugging this issue I think it might be related to the new version of the You can do so using these instructions also have a look at issue #408. Please let me know if this solves the issue. |
This issue should be solved in version 6.0.0-rc.x. I will be promoting this to stable soon. Also make sure on Android you add the |
It might be worth mentioning in the README.md that using |
@matthewlloyd thank you for the suggestion. This morning I release the final 6.0.0 version of the geolocator and made sure I updated the documentation to explain about the |
geolocator: ^5.2.1
I have obtained location permissions,but calling the mehtod
await Geolocator().getLastKnownPosition(desiredAccuracy: LocationAccuracy.high).then((location){print('$location');});
the location is null;
and calling the mehtod
await Geolocator().getCurrentPosition(desiredAccuracy: LocationAccuracy.high).then((location){print('$location');});
there is no response for location。
The text was updated successfully, but these errors were encountered: