<?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 LocationDisplayManager and Handler Pattern in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/locationdisplaymanager-and-handler-pattern/m-p/206155#M1371</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am starting to use the Android Runtime SDK and was wondering about recommended coding patterns when using the LocationDisplayManager.&amp;nbsp; I am relatively new to Android development and still learning so likely missing something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I can tell its common to use the following pattern when defining handlers:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;object.registerListener(handler);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;object.unregisterListener(handler);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g. during the onResume(), onPause() lifecycle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the LocationDisplayManager provides the setLocationListener() method which I am using as (my Activity implements LocationListener):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;locationDisplayManager.setLocationListener(this);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to use the registerListener(), unregisterListener() pattern?&amp;nbsp; How would I detach my class from listening to the events defined on the LocationDisplayManager?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shaun&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Mar 2014 10:40:01 GMT</pubDate>
    <dc:creator>ShaunNicholson</dc:creator>
    <dc:date>2014-03-24T10:40:01Z</dc:date>
    <item>
      <title>LocationDisplayManager and Handler Pattern</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/locationdisplaymanager-and-handler-pattern/m-p/206155#M1371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am starting to use the Android Runtime SDK and was wondering about recommended coding patterns when using the LocationDisplayManager.&amp;nbsp; I am relatively new to Android development and still learning so likely missing something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I can tell its common to use the following pattern when defining handlers:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;object.registerListener(handler);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;object.unregisterListener(handler);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g. during the onResume(), onPause() lifecycle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the LocationDisplayManager provides the setLocationListener() method which I am using as (my Activity implements LocationListener):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;locationDisplayManager.setLocationListener(this);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to use the registerListener(), unregisterListener() pattern?&amp;nbsp; How would I detach my class from listening to the events defined on the LocationDisplayManager?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shaun&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 10:40:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/locationdisplaymanager-and-handler-pattern/m-p/206155#M1371</guid>
      <dc:creator>ShaunNicholson</dc:creator>
      <dc:date>2014-03-24T10:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: LocationDisplayManager and Handler Pattern</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/locationdisplaymanager-and-handler-pattern/m-p/206156#M1372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can use the Start() and Stop() methods.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 12:44:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/locationdisplaymanager-and-handler-pattern/m-p/206156#M1372</guid>
      <dc:creator>teamIgal</dc:creator>
      <dc:date>2014-03-24T12:44:47Z</dc:date>
    </item>
  </channel>
</rss>

