-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
4.5.2-beta - issue #274 regression #280
Comments
Hi James, I know you are busy. Any chance to have a look at this one? |
There was no changes in code at all, just the permissions plugin. Ensure you clean/rebuild it correct. |
Hello James, Believe me, I'm very aware of that tedious process of deleting bin & obj directories as well as issuing a rebuild all when upgrading / updating packages... I do that all the time, and it's a pain! Having said that and doing it for every change, I tested all combinations of Plugin.Permissions & Xam.Plugin.Geolocator and there is definitely something wrong. My tests concluded the following:
More specifically, the only combinations that are working for me are:
On Android:
Unless I'm doing something wrong, there is definitely some issue. On your side, have you tested your latest versions with your sample on each platform? |
Testing out my sample now! |
Upgraded sample works great. Checked into repo and attached here. |
Hi James. Call me stubborn... but no... your sample does exhibit the exact behaviour I'm seeing and which I was describing. Follow this test scenario on iOS:
In your sample's source code, the first var hasPermission = await Utils.CheckPermissions(Permission.Location); returns true! (which is expected) but the line: var position = await locator.GetPositionAsync(TimeSpan.FromSeconds(Timeout.Value), null, IncludeHeading.IsToggled); does take about 8 seconds and produces the 3 error messages above. Now, change your solution and downgrade Can you reproduce this behavior? I'll test on Android tomorrow. |
This is different then what you said and is yes the expected result as to how iOS handles premissions. However, i am going to simplify this by removing the background junk from GetPositionAsync and then it will never check those :) |
The above would only happen if you have both permissions set and background items, it wouldn't happen if you just had WhenInUse only set. |
If you are only using GetLocationAsync i also recommend moving to Xamarin.Essentials. |
Well, issue #274 tried to described exactly that.
If you mean by that that it only happens if we have set "Location Updates" in Info.plist and answering "While using" rather than "Always", well yes, that was the case. And seeing the part of the code you removed, I can now see why it happened.
I'm using Xamarin.Essentials already for other functionalities (great library indeed, so thanks!) so yes, at least for GetLocationAsync I might consider it. |
Just tested out with latest 4.5.4-beta (and with Permissions 4.0.2-beta) and all seems to work as expected on both platform. Stubbornness pays... eventually ;) Thanks! |
YAY! I think for the great good! I now see how exactly it was happening |
Hi,
4.5.1-beta fixed issue #274
I tested today 4.5.2-beta and the same issue seems to be happening again.
Would there be any reason for it?
I downgraded to 4.5.1-beta and it worked again as it should.
The text was updated successfully, but these errors were encountered: