<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: GPS Logging in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1690052#M13883</link>
    <description>&lt;P&gt;I know this is a very old thread, but I was just looking for this and found that there is an event now as of the Maps SDK 200.7. So, for anyone else landing here in the future:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Location.NmeaLocationDataSource.SentenceReceived.html" target="_blank"&gt;https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Location.NmeaLocationDataSource.SentenceReceived.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Mar 2026 18:59:12 GMT</pubDate>
    <dc:creator>FelicityRhone</dc:creator>
    <dc:date>2026-03-11T18:59:12Z</dc:date>
    <item>
      <title>GPS Logging</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1195651#M11166</link>
      <description>&lt;P&gt;How can I log NMEA messages coming from a&amp;nbsp;NmeaLocationDataSource?&lt;/P&gt;&lt;P&gt;public event EventHandler&amp;lt;Location&amp;gt;? LocationChanged; &amp;lt;--- this gives a location object, but not the raw messages&amp;nbsp; that lead to that point. What are the chances of getting those in an event? Or some other way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Patrick Shearon&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 15:52:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1195651#M11166</guid>
      <dc:creator>pshearon</dc:creator>
      <dc:date>2022-07-26T15:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: GPS Logging</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1196073#M11174</link>
      <description>&lt;P&gt;There's no out-of-the-box support for this today (it's on our backlog). However, you could intercept the NMEA stream with a stream interceptor class. For example:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public class StreamInterceptor : Stream
{
    private readonly Stream _baseStream;

    public StreamInterceptor(Stream baseStream)
    {
        _baseStream = baseStream;
    }

    public event EventHandler&amp;lt;string&amp;gt;? OnData;

    public override int Read(byte[] buffer, int offset, int count)
    {
        int read = _baseStream.Read(buffer, offset, count);
        if (read &amp;gt; 0)
        {
            OnData?.Invoke(this, Encoding.UTF8.GetString(buffer, 0, read));
        }
        return read;
    }

    public override bool CanRead =&amp;gt; _baseStream.CanRead;

    public override bool CanSeek =&amp;gt; _baseStream.CanSeek;

    public override bool CanWrite =&amp;gt; _baseStream.CanWrite;

    public override long Length =&amp;gt; _baseStream.Length;

    public override long Position { get =&amp;gt; _baseStream.Position; set =&amp;gt; _baseStream.Position = value; }

    public override void Flush() =&amp;gt; _baseStream.Flush();

    public override long Seek(long offset, SeekOrigin origin) =&amp;gt; _baseStream.Seek(offset, origin);

    public override void SetLength(long value) =&amp;gt; _baseStream.SetLength(value);

    public override void Write(byte[] buffer, int offset, int count) =&amp;gt; _baseStream.Write(buffer, offset, count);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you could create the nmea datasource using this new stream type and listen to the OnData event:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;SerialPort p = new SerialPort("COM3");
NmeaLocationDataSource ds = NmeaLocationDataSource.FromStreamCreator(
    onStart: (ds) =&amp;gt;
    {
        p.Open();
        var sl = new StreamInterceptor(p.BaseStream);
        sl.OnData += (s, nmeaString) =&amp;gt;
        {
            Console.Write(nmeaString); // NMEA raw data string
        };
        return Task.FromResult&amp;lt;System.IO.Stream&amp;gt;(sl);
    },
    onStop: (ds) =&amp;gt;
    {
        p.Close();
        return Task.CompletedTask;
    }
    );

ds.StartAsync();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 19:03:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1196073#M11174</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2022-07-26T19:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: GPS Logging</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1196581#M11182</link>
      <description>&lt;P&gt;What would you recommend for FromBluetooth devices?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 22:08:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1196581#M11182</guid>
      <dc:creator>pshearon</dc:creator>
      <dc:date>2022-07-27T22:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: GPS Logging</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1196585#M11183</link>
      <description>&lt;P&gt;If you're using .NET 6, you don't actually need to use the bluetooth version, but can still use them as a serial port (Windows will assign them port numbers). But otherwise, you'd have to grab the bluetooth data stream yourself before using the above.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 22:15:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1196585#M11183</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2022-07-27T22:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: GPS Logging</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1196633#M11184</link>
      <description>&lt;P&gt;Thanks a lot, your insight has been very helpful. Since it's all on windows (.NET 6) I will be going with&amp;nbsp;System.IO.Ports.SerialPort and that StreamInterceptor.&amp;nbsp; All of my tests worked with your suggestions!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Patrick Shearon&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 01:30:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1196633#M11184</guid>
      <dc:creator>pshearon</dc:creator>
      <dc:date>2022-07-28T01:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: GPS Logging</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1690052#M13883</link>
      <description>&lt;P&gt;I know this is a very old thread, but I was just looking for this and found that there is an event now as of the Maps SDK 200.7. So, for anyone else landing here in the future:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Location.NmeaLocationDataSource.SentenceReceived.html" target="_blank"&gt;https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Location.NmeaLocationDataSource.SentenceReceived.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 18:59:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/gps-logging/m-p/1690052#M13883</guid>
      <dc:creator>FelicityRhone</dc:creator>
      <dc:date>2026-03-11T18:59:12Z</dc:date>
    </item>
  </channel>
</rss>

