Xamarin Forms - How to avoid Calibration screen pops up while using app.

We have xamarin forms application and I am using Xam.Plugin.Geolocator plugin inorder to access the location (lat and long) service.

ISSUE:
Here, while using my app, at some cases, the OS invokes the calibration screen over my application.

It can be fixed using the below code in Xamarin.iOS :

#if DEBUG
iPhoneLocationManager.ShouldDisplayHeadingCalibration += (CLLocationManager manager) => {return false;};
#endif

BUT ISSUE IS -- HOW TO FIX THIS IN XAMARIN FORMS APPLICATION.

Please anyone help me to fix the issue. Thank you in advance.

Posts

  • izhangizhang USMember, Xamarin Team Xamurai

    Are you seeing this when running the Xamarin.Forms app on an iOS device? Or do you also see this in Android devices as well?

  • KirubaShankarKirubaShankar Member ✭✭

    Thanks for the reply izhang.

    Actually we are supporting only for iOS as of now. Later we provide it for Android too.

    Hence I see only in iOS.

    Actually, in Xam.Plugin.Geolocator plugin, they have fixed this issue; but haven't released it, I believe. Waiting for the release.

    Am I correct or going wrong?

  • izhangizhang USMember, Xamarin Team Xamurai

    Where do you see that? I'm looking at the GitHub issues and don't see one specific to this but I may have missed something.

  • KirubaShankarKirubaShankar Member ✭✭

    Please find the below links:

    https://github.com/xamarin/Essentials/issues/281
    https://github.com/xamarin/Essentials/pull/282

    You could see that there is an issue with Calibration and seems they have fixed it.

  • Did you guys ever figured this one out? Like you I tried this from the appDelegate but it seems of course that what needs to be done is override the current instance of the LocationManager. Any ideas?

Sign In or Register to comment.