<?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 Bug when using OnStatusChangedListener? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/bug-when-using-onstatuschangedlistener/m-p/12998#M79</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;SPAN&gt;I'm caching a FeatureLayer to use it in offline mode. That works really good.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I want to do this automatically after the FeatureLayer has been loaded succesfully.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For this i use the OnStatusChangeListener of the MapView:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map.setOnStatusChangedListener(new OnStatusChangedListener(){&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; public void onStatusChanged(Object source, STATUS status) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if (source.equals(FeatureLayer) &amp;amp;&amp;amp; status.equals(STATUS.LAYER_LOADED))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cachingLayers();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When the event is fired i get an error that sais that the Graphics of the FeatureLayer have not been loaded correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But my oppinion is, when the event, that the FeatureLayer has been loaded correctly, was fired, all properties should be initialized.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The really interesting thing is the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When i put a Thread.sleep(500) before the Method cachingLayers() all properties have been loaded and the caching works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think this is quite strange and looks to me like a bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone perhaps an idea?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Jan 2013 09:33:00 GMT</pubDate>
    <dc:creator>KevinGebhardt</dc:creator>
    <dc:date>2013-01-11T09:33:00Z</dc:date>
    <item>
      <title>Bug when using OnStatusChangedListener?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/bug-when-using-onstatuschangedlistener/m-p/12998#M79</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;SPAN&gt;I'm caching a FeatureLayer to use it in offline mode. That works really good.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I want to do this automatically after the FeatureLayer has been loaded succesfully.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For this i use the OnStatusChangeListener of the MapView:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map.setOnStatusChangedListener(new OnStatusChangedListener(){&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; public void onStatusChanged(Object source, STATUS status) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if (source.equals(FeatureLayer) &amp;amp;&amp;amp; status.equals(STATUS.LAYER_LOADED))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cachingLayers();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When the event is fired i get an error that sais that the Graphics of the FeatureLayer have not been loaded correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But my oppinion is, when the event, that the FeatureLayer has been loaded correctly, was fired, all properties should be initialized.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The really interesting thing is the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When i put a Thread.sleep(500) before the Method cachingLayers() all properties have been loaded and the caching works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think this is quite strange and looks to me like a bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone perhaps an idea?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 09:33:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/bug-when-using-onstatuschangedlistener/m-p/12998#M79</guid>
      <dc:creator>KevinGebhardt</dc:creator>
      <dc:date>2013-01-11T09:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when using OnStatusChangedListener?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/bug-when-using-onstatuschangedlistener/m-p/12999#M80</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;maybe you should focus the Options of ArcGISFeatureLayer, change options.mode and try again ? i just surmise�??:(&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 07:04:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/bug-when-using-onstatuschangedlistener/m-p/12999#M80</guid>
      <dc:creator>RafaelLuo</dc:creator>
      <dc:date>2013-01-15T07:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when using OnStatusChangedListener?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/bug-when-using-onstatuschangedlistener/m-p/13000#M81</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can someone from ESRI please comment? This looks like a long standing issue, first mentioned over a year ago in this thread: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/46408-Dynamic-layer-does-not-load-or-only-after-device-rotation?highlight=LAYER_LOADED"&gt;Dynamic layer does not load or only after device rotation&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this ever actually fire, and if so, what are the conditions? I have an issue where I'm trying to update the symbology for a few graphics after an ArcGISFeatureLayer has loaded, and if I try to do this on status INITIALIZED it sometimes crashes the program. Here are the relevant LogCat lines:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;02-11 17:18:39.846: I/Runtime Core(5226): encoding image failure in Picture_marker_symbol::to_JSON&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;02-11 17:18:39.846: A/libc(5226): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 5310 (pool-2-thread-1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As it's intermittent, it seems obvious that calling Layer.updateGraphic() after STATUS.Initialized is error prone, but I can't find a reliable way to know that it is a safe call to make. Obviously I can put in an arbitrary delay which should *fix* the problem, but I have to believe there is a cleaner way to do this. Can someone from ESRI please enlighten me?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 21:25:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/bug-when-using-onstatuschangedlistener/m-p/13000#M81</guid>
      <dc:creator>JasonKnisley</dc:creator>
      <dc:date>2014-02-11T21:25:45Z</dc:date>
    </item>
  </channel>
</rss>

