<?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 [Arcgis-android-sdk-10.2.X] StrictMode in MapView in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/arcgis-android-sdk-10-2-x-strictmode-in-mapview/m-p/387696#M2642</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now, I am using an argis android sdk 10.2.x in which version is actually "10.2.8-1" upgraded from "10.2.7".&lt;/P&gt;&lt;P&gt;I got an error messessages&amp;nbsp; while I ran a android project on the phone(galaxy 2014 edition and galaxy tab 2) in 'StrictMode' running.&lt;/P&gt;&lt;P&gt;There are two cases of the strict mode error as following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. java.lang.Throwable: Explicit termination method 'end' not called&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;1.1. Native library loading&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="padding-left: 30px;"&gt;...skip&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at java.net.URL.openStream(URL.java:470)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at java.lang.Class.getResourceAsStream(Class.java:1175)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at com.esri.android.map.LocationDisplayManager$a.&amp;lt;init&amp;gt;(SourceFile:767)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;...skip...&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to be the situation when a try statement without finally block of code in LocationManager class, where the native library of arcgis is loading from user app's system path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="padding-left: 30px;"&gt;try&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;{&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; in = LocationManager.class.getResourceAsStream("arcgis.map")&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; in.close();&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;}&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;catch(error e)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;{&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;...some error handling&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;}&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;STRONG&gt;finally&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; if(in != null) try{ in.close(); in = null; }catch(IOException){ }&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;1.2. Network communication with Arcgis server&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="padding-left: 30px;"&gt;at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:105)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at org.apache.http.util.EntityUtils.toString(EntityUtils.java:117)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at com.esri.core.internal.io.handler.h$1.handleResponse(SourceFile:201)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;...skip...&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:742)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This might be also the same point described in "1.1 Native library loading".&amp;nbsp; The resource must be released by close method explicitly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;2. No data tile ETag couldn't be retrieved&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;This message is always catched by debugger with name of "ArcGIS" tag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="padding-left: 30px;"&gt;com.esri.core.io.EsriServiceException: Not Found&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;...skip&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at com.esri.android.map.ags.ArcGISTiledMapServiceLayer.retrieveNoDataTileETag(SourceFile:570)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at com.esri.android.map.ags.ArcGISTiledMapServiceLayer.initLayer(SourceFile:201)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;...skip&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The initLayer method of ArcGISTiledMapServiceLayer class is protected so there is no way to handle this error message by user like me.&lt;/P&gt;&lt;P&gt;Even I can not find the exact point where my code conflict...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;3. My opinion and question about this issue.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the number 1.1 and 1.2 must be patched quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As about number 2,&lt;/P&gt;&lt;P&gt;Is there any way to handle&amp;nbsp; or avoid these errors from arcgis library?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your answer will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Sep 2016 09:04:11 GMT</pubDate>
    <dc:creator>YOUNG_GONBAEK</dc:creator>
    <dc:date>2016-09-27T09:04:11Z</dc:date>
    <item>
      <title>[Arcgis-android-sdk-10.2.X] StrictMode in MapView</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/arcgis-android-sdk-10-2-x-strictmode-in-mapview/m-p/387696#M2642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now, I am using an argis android sdk 10.2.x in which version is actually "10.2.8-1" upgraded from "10.2.7".&lt;/P&gt;&lt;P&gt;I got an error messessages&amp;nbsp; while I ran a android project on the phone(galaxy 2014 edition and galaxy tab 2) in 'StrictMode' running.&lt;/P&gt;&lt;P&gt;There are two cases of the strict mode error as following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. java.lang.Throwable: Explicit termination method 'end' not called&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;1.1. Native library loading&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="padding-left: 30px;"&gt;...skip&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at java.net.URL.openStream(URL.java:470)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at java.lang.Class.getResourceAsStream(Class.java:1175)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at com.esri.android.map.LocationDisplayManager$a.&amp;lt;init&amp;gt;(SourceFile:767)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;...skip...&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to be the situation when a try statement without finally block of code in LocationManager class, where the native library of arcgis is loading from user app's system path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="padding-left: 30px;"&gt;try&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;{&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; in = LocationManager.class.getResourceAsStream("arcgis.map")&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; in.close();&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;}&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;catch(error e)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;{&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;...some error handling&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;}&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;STRONG&gt;finally&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; if(in != null) try{ in.close(); in = null; }catch(IOException){ }&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;1.2. Network communication with Arcgis server&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="padding-left: 30px;"&gt;at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:105)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at org.apache.http.util.EntityUtils.toString(EntityUtils.java:117)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at com.esri.core.internal.io.handler.h$1.handleResponse(SourceFile:201)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;...skip...&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:742)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This might be also the same point described in "1.1 Native library loading".&amp;nbsp; The resource must be released by close method explicitly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;2. No data tile ETag couldn't be retrieved&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;This message is always catched by debugger with name of "ArcGIS" tag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="padding-left: 30px;"&gt;com.esri.core.io.EsriServiceException: Not Found&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;...skip&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at com.esri.android.map.ags.ArcGISTiledMapServiceLayer.retrieveNoDataTileETag(SourceFile:570)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;at com.esri.android.map.ags.ArcGISTiledMapServiceLayer.initLayer(SourceFile:201)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;...skip&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The initLayer method of ArcGISTiledMapServiceLayer class is protected so there is no way to handle this error message by user like me.&lt;/P&gt;&lt;P&gt;Even I can not find the exact point where my code conflict...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;3. My opinion and question about this issue.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the number 1.1 and 1.2 must be patched quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As about number 2,&lt;/P&gt;&lt;P&gt;Is there any way to handle&amp;nbsp; or avoid these errors from arcgis library?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your answer will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 09:04:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/arcgis-android-sdk-10-2-x-strictmode-in-mapview/m-p/387696#M2642</guid>
      <dc:creator>YOUNG_GONBAEK</dc:creator>
      <dc:date>2016-09-27T09:04:11Z</dc:date>
    </item>
  </channel>
</rss>

