ArcGis SystemLocationDataSource vs Xamarin LocationManager

10-24-2019 07:45 AM
New Contributor

Location, location, location.

Is there an advantage to using SystemLocationDataSource over LocationManager? My (Xamarin Android) app is using the former, but it seems a little constricting. Why should I give up the ability to specify a polling rate (milli's), and sensitivity (meters)? The data coming off the SLDS is kind of like a fire hose that I have to turn on and off (async) which in my opinion makes it kind of a pain to use. Help me understand where's the benefit from the over-simplified Esri approach?

0 Kudos
2 Replies
MVP Regular Contributor

I would probably just say simplicity.  You don't need to do anything to use the SystemLocationDataSource it's already implemented.  If you wanted to tie any other location provider into the MapView's LocationDisplay you will have to write a custom LocationDataSource.  Not an overly difficult task, but more difficult than doing nothing.


0 Kudos
Esri Frequent Contributor

The SystemLocationDataSource is meant to be a simple common API across all the platforms - of course with a common cross-platform API it does create some "least common denominator" limitations.

Internally it's driven by the same Android location APIs, so there shouldn't be much difference. Of course you don't get access to the low-level objects that are specific to Android, and it defaults to high-accuracy mode, as this is generally what people would expect.

For more low-level access you'd have to implement your own LocationDataSource, which is mainly just start/stop and report new location methods.

0 Kudos