When I use the WinRT Geolocator, I sporadically get the error:
{"The pipe is being closed. (Exception from HRESULT: 0x800700E8)"}
Again, this is sporadic. Any suggestions?
Windows.Devices.Geolocation.Geoposition _Postion = null;
try
{
var _Locator = new Windows.Devices.Geolocation.Geolocator();
_Postion = await _Locator.GetGeopositionAsync();
}
catch { /* continue, null okay */ }
if (_Postion == null)
{
/* use alternate */
}
else
{
/* use location */
}
This is in the simulator, but also when run on local machine. Usually this error will NOT result in a break. It just ends the app suddenly. When it does result in a break. That is the resulting error.
I figured out that this happened when your localization is set as "simulated", if you are running your app using device simulator you may disable this by click in world icon (between display and camera settings), then uncheck "Use simulated location" option
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With