|
POST
|
Hi, Am seeing some really odd behavior with Windows and authentication. I have code that works fine in Xamarin forms on iOS. Very simple, just setting up Authentication. What I am seeing though is that in WPF (both Win standard and NET6) the challenge handler does not get called. It just does not go into the method, and then I get an unauthorized error trying to open the item. As I said, the same code works in Xamarin Forms, I can look at the AuthenticationManager and see a registered method for the challenge handler, but it does not enter the method. Any thoughts on something additional needed in WPF. I have gone through the samples and do not see anything being done that differs Thanks - Joe
... View more
07-25-2022
09:31 AM
|
0
|
6
|
2326
|
|
POST
|
See this thread Code to use MAUI (until official support in ArcGIS Runtime for .NET) which @SomeGISGuy has been commenting on. Seems they are doing their best to keep up with a moving target. Other XF APIs I am working with seem to be having similar struggles moving to MAUI
... View more
07-18-2022
09:02 AM
|
0
|
0
|
1048
|
|
POST
|
Hi Morten, Wondering if anything in the latest updates might impact iOS showing a MapView. I'm at Visual Studio Version 17.3.0 Preview 3.0 and Runtime 100.14.1-preview3. I get a map to show up in Windows but not in iOS 15.5 simulator. Thanks -Joe
... View more
07-15-2022
08:03 AM
|
0
|
1
|
2419
|
|
POST
|
Not sure I understand the return false; inside the conditional, because it will only remove the first one it finds that meets this condition. I would use LINQ to get a IEnumerable of the graphics I want to remove and then loop through it to do the removals. Again not clear on the purpose of the return, but the below example would return false if anything needed to be removed var graphics = _graphicsOverlay.Graphics.Where(g =>
(int)g.Attributes["ORDER"] == mapUnits.Order && (int)g.Attributes["RANGE"] == range &&
g.Attributes["TYPE"].ToString() == "RING");
bool result = true;
foreach (var graphic in graphics)
{
_graphicsOverlay.Graphics.Remove(graphic);
result = false;
}
return result; You are going to get an illegal cast exception if either ORDER or RANGE is null. You could do something along these lines to avoid that possibility var graphics = _graphicsOverlay.Graphics.Where(g =>
{
int order = g.Attributes["ORDER"] == null ? 0 : (int)g.Attributes["ORDER"];
int range = g.Attributes["RANGE"] == null ? 0 : (int)g.Attributes["RANGE"];
string type = g.Attributes["TYPE"] == null ? string.Empty : g.Attributes["TYPE"].ToString();
return order == mapUnits.Order && range == _range && type == "RING";
});
bool result = true;
foreach (var graphic in graphics)
{
result = false;
_graphicsOverlay.Graphics.Remove(graphic);
}
return result;
... View more
07-08-2022
09:26 AM
|
0
|
2
|
991
|
|
POST
|
It seems to me you would need a custom LocationDataSource. This is not overly complex to implement. You would need to read the file and then call the UpdateLocation with the Location object you create from the data stream you are receiving. Then on the MapView you update the LocationDisplay.DataSource to use your custom LocationDataSource. After that everything would behave as though you were receiving location from any other data source.
... View more
06-14-2022
10:53 AM
|
1
|
0
|
1180
|
|
POST
|
Here is what is in the AppCenter Diagnostics: Application.Main (System.String[] args) /Users/runner/work/1/s/src/Mobile.Design.iOS/Main.cs, line 15 SIGABRT: Could not initialize an instance of the type 'ExternalAccessory.EASession': the native 'initWithAccessory:forProtocol:' method returned nil. It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false Line 15 is just the startup: UIApplication.Main(args, null, typeof(AppDelegate)); --------------------------- Stack traces NSObject.InitializeHandle (System.IntPtr handle, System.String initSelector) /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSObject2.cs:609 /Users/builder/azdo/_work/2/s/xamarin-macios/src/build/ios/native/ExternalAccessory/EASession.g.cs:79 Esri.ArcGISRuntime.Location.NmeaLocationDataSource+EAAccessoryStream..ctor (ExternalAccessory.EAAccessory accessory, System.String protocol) [0x0000d] in <fc2ff9f8183b4871b39c22ae8fb2d60c>:0 NmeaLocationDataSource+<>c__DisplayClass33_0.<FromAccessory>b__0 (Esri.ArcGISRuntime.Location.NmeaLocationDataSource d) NmeaLocationDataSource+CreateStreamNmeaLocationDataSource.OnStartAsync () ArcGISException.HandleCoreError (RuntimeCoreNet.GeneratedWrappers.CoreError error, System.Boolean throwException) Interop.CheckError (System.IntPtr errorHandle, System.Boolean throwOnFailure, System.Runtime.InteropServices.GCHandle wrapperHandle) CoreTask.Get () CoreTaskExtensions+TaskCompletedCallbackHandler.OnCompleted (System.Object sender, System.EventArgs e) CoreTaskExtensions+TaskCompletedCallbackHandler.CreateInternal (RuntimeCoreNet.GeneratedWrappers.CoreTask task, System.Threading.CancellationToken cancellationToken) MapViewControl.SetupLocationDataSource () AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021 NSAsyncSynchronizationContextDispatcher.Apply () /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSAction.cs:178 (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr) UIApplication.Main (System.String[] args, System.Type principalClass, System.Type delegateClass) /Users/builder/azdo/_work/2/s/xamarin-macios/src/UIKit/UIApplication.cs:85 Application.Main (System.String[] args) /Users/runner/work/1/s/src/Mobile.Design.iOS/Main.cs:15 Looking at it I do see a place that I could catch an exception I had not noticed before. But one thing that really confuses me is the user reporting that this has occurred once they have connected and have collected a point. The initialization of the LocationDataSource is done when the MapView is initially loaded. So I am not clear how there would be an additional attempt to connect (and there is always the chance the user who reported things is describing something incorrectly). It is not an issue that occurs often, it may have only happened on one day. The device is a Geneq SxBlue. We have 100 users with the exact same device in the field Thanks
... View more
06-01-2022
10:08 AM
|
0
|
1
|
860
|
|
POST
|
Hi, [lets try and write this a second time after GeoNet failed] We switched over to the NmeaLocationDataSource from our own custom LocationDataSource for collecting from an external iOS device. Been working great and removed a lot of custom code But we have gotten a system crash when using the NmeaLocationDataSource. It has happened both when making initial connection to the unit and once the user is already collecting GPS data. When it happens while collecting data the user does say they see the LastKnown location indicator (the grey dot). The stack trace shows occurring in OnStartAsync. So not sure if it tries to call this again when the connection is dropped. It seems to me to be an issue with the actual connection between the unit and the iOS device, but possibly is a result of the unit not receiving good data As much as anything it would be nice to be able to catch the exception so it does not crash the application but I cannot seem to find where one would handle the exception Thanks @SomeGISGuy Stack trace from crash NSObject.InitializeHandle (System.IntPtr handle, System.String initSelector) /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSObject2.cs:609
/Users/builder/azdo/_work/2/s/xamarin-macios/src/build/ios/native/ExternalAccessory/EASession.g.cs:79
Esri.ArcGISRuntime.Location.NmeaLocationDataSource+EAAccessoryStream..ctor (ExternalAccessory.EAAccessory accessory, System.String protocol) [0x0000d] in <fc2ff9f8183b4871b39c22ae8fb2d60c>:0
NmeaLocationDataSource+<>c__DisplayClass33_0.<FromAccessory>b__0 (Esri.ArcGISRuntime.Location.NmeaLocationDataSource d)
NmeaLocationDataSource+CreateStreamNmeaLocationDataSource.OnStartAsync ()
ArcGISException.HandleCoreError (RuntimeCoreNet.GeneratedWrappers.CoreError error, System.Boolean throwException)
... View more
05-31-2022
10:46 AM
|
0
|
3
|
886
|
|
POST
|
Thanks for this, saved us on a Friday night upgrade
... View more
05-24-2022
11:56 AM
|
0
|
0
|
2011
|
|
POST
|
I know how to update a domain associated at the feature level in AGOL. However, in many cases domains have to be applied at the subtype level (Utility Network standard is setup in this manner). Is there a way to do this to an already published feature service. I know the UI won't support, but what about via rest or python API Thanks
... View more
05-11-2022
07:20 AM
|
0
|
0
|
360
|
|
POST
|
For internet/cell connectivity I use the Xamarin.Essentials library Connectivity object Connectivity.ConnectivityChanged += OnConnectivityChanged;
... View more
04-05-2022
10:39 AM
|
1
|
0
|
1640
|
|
POST
|
I did not mean ping in the literal sense of sending an ICMP request. It was just meant in a generic way, as send a request to the server and see if you get a response from the server. If you look at the code sample it shows that a standard request over 443 is being sent. The same as any request that is being sent to portal. Just it requests a very generic reply which can be checked or you can see if it times out instead of getting a reply. In my case I have this run continuously in the background. This way prior to doing any operation that requires a connection there is confirmation that a connection to the portal is available.
... View more
04-01-2022
08:35 AM
|
0
|
1
|
1653
|
|
POST
|
I basically just ping the portal and see if I get a response. I have this run in the background and it sets a flag that I check before doing something that requires a connection public override async Task<bool> CheckIsConnectedAsync()
{
try
{
var tokenUri = new Uri($"{ConnectionUrl}/sharing/rest?f=json");
HttpClient client = new HttpClient { Timeout = TimeSpan.FromSeconds(7) };
var result = await client.GetStringAsync(tokenUri);
var jsonObject = JsonConvert.DeserializeObject<Dictionary<string, object>>(result);
//just something I know is in the return json
return jsonObject.ContainsKey("currentVersion");
}
catch ( TaskCanceledException )
{
//timeout - server down
return false;
}
catch ( Exception )
{
//Can connect but server not fully up and running
return false;
}
}
... View more
03-30-2022
01:19 PM
|
1
|
3
|
1673
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-23-2025 12:16 PM | |
| 1 | 10-19-2022 01:08 PM | |
| 1 | 09-03-2025 09:25 AM | |
| 1 | 04-16-2025 12:37 PM | |
| 1 | 03-18-2025 12:17 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-04-2025
04:12 PM
|