Skip to content
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

Disable showing of location calibration on iOS #302

Merged
merged 1 commit into from
Jun 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ public GeolocationSingleUpdateDelegate(CLLocationManager manager, double desired
t.Dispose();
}, null, timeout, 0);
}

#if __IOS__
manager.ShouldDisplayHeadingCalibration += (CLLocationManager locationManager) =>
{
locationManager.DismissHeadingCalibrationDisplay();
return false;
};
#endif

cancelToken.Register(() =>
{
Expand All @@ -57,7 +65,6 @@ public GeolocationSingleUpdateDelegate(CLLocationManager manager, double desired

public Task<Position> Task => tcs?.Task;


public override void AuthorizationChanged(CLLocationManager manager, CLAuthorizationStatus status)
{
// If user has services disabled, we're just going to throw an exception for consistency.
Expand All @@ -83,9 +90,12 @@ public override void Failed(CLLocationManager manager, NSError error)
}
}


#if __IOS__
public override bool ShouldDisplayHeadingCalibration(CLLocationManager manager) => false;
public override bool ShouldDisplayHeadingCalibration(CLLocationManager locationManager)
{
locationManager.DismissHeadingCalibrationDisplay();
return false;
}
#endif

#if __TVOS__
Expand Down Expand Up @@ -169,4 +179,4 @@ private void StopListening()
manager.StopUpdatingLocation();
}
}
}
}