<?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 Support the Expiration of Token in Android App in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/support-the-expiration-of-token-in-android-app/m-p/575307#M3912</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're developing an android app which uses ArcGIS SDK for Android. In order to connect to secure layers we're using token based authorization.&lt;/P&gt;&lt;P&gt;When the requested token has expired we'd like to refresh it but I cannot find a way how to catch this moment. What actually the ArcGIS library does is just writes error messages into log when a user pans or zooms:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN&gt;com.esri.core.io.EsriSecurityException: Invalid request &amp;lt;br&amp;gt;Usage: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://arcgis.example.com/arcgis/tokens?request=gettoken&amp;amp;username=username&amp;amp;password=password&amp;amp;" rel="nofollow" target="_blank"&gt;https://arcgis.example.com/arcgis/tokens?request=gettoken&amp;amp;username=username&amp;amp;password=password&amp;amp;&lt;/A&gt;&lt;SPAN&gt;&amp;lt;br&amp;gt;Usage: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://arcgis" rel="nofollow" target="_blank"&gt;https://arcgis&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;EM&gt;example.com&lt;/EM&gt;&lt;SPAN&gt;/arcgis/tokens/generateToken?username=username&amp;amp;password=password&amp;amp;&amp;lt;br&amp;gt;Usage: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://arcgis" rel="nofollow" target="_blank"&gt;https://arcgis&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;EM&gt;example.com&lt;/EM&gt;/arcgis/tokens/gettoken.html&amp;lt;br&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I had a look at the sample mentioned in this &lt;A class="jive-link-external-small" href="https://developers.arcgis.com/android/guide/working-with-secure-arcgis-services.htm" rel="nofollow" target="_blank"&gt;article&lt;/A&gt; but the MapView event does not trigger the &lt;A class="jive-link-external-small" href="https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/MapView.html#setOnStatusChangedListener(com.esri.android.map.event.OnStatusChangedListener)" rel="nofollow" target="_blank"&gt;event&lt;/A&gt; when token gets expired.&lt;/P&gt;&lt;P&gt;I know that I may refresh the token when expiration time comes but I think its better to handle this error because it more reliable and simple.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2014 10:08:17 GMT</pubDate>
    <dc:creator>EduardLepner</dc:creator>
    <dc:date>2014-09-15T10:08:17Z</dc:date>
    <item>
      <title>Support the Expiration of Token in Android App</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/support-the-expiration-of-token-in-android-app/m-p/575307#M3912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're developing an android app which uses ArcGIS SDK for Android. In order to connect to secure layers we're using token based authorization.&lt;/P&gt;&lt;P&gt;When the requested token has expired we'd like to refresh it but I cannot find a way how to catch this moment. What actually the ArcGIS library does is just writes error messages into log when a user pans or zooms:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN&gt;com.esri.core.io.EsriSecurityException: Invalid request &amp;lt;br&amp;gt;Usage: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://arcgis.example.com/arcgis/tokens?request=gettoken&amp;amp;username=username&amp;amp;password=password&amp;amp;" rel="nofollow" target="_blank"&gt;https://arcgis.example.com/arcgis/tokens?request=gettoken&amp;amp;username=username&amp;amp;password=password&amp;amp;&lt;/A&gt;&lt;SPAN&gt;&amp;lt;br&amp;gt;Usage: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://arcgis" rel="nofollow" target="_blank"&gt;https://arcgis&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;EM&gt;example.com&lt;/EM&gt;&lt;SPAN&gt;/arcgis/tokens/generateToken?username=username&amp;amp;password=password&amp;amp;&amp;lt;br&amp;gt;Usage: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://arcgis" rel="nofollow" target="_blank"&gt;https://arcgis&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;EM&gt;example.com&lt;/EM&gt;/arcgis/tokens/gettoken.html&amp;lt;br&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I had a look at the sample mentioned in this &lt;A class="jive-link-external-small" href="https://developers.arcgis.com/android/guide/working-with-secure-arcgis-services.htm" rel="nofollow" target="_blank"&gt;article&lt;/A&gt; but the MapView event does not trigger the &lt;A class="jive-link-external-small" href="https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/MapView.html#setOnStatusChangedListener(com.esri.android.map.event.OnStatusChangedListener)" rel="nofollow" target="_blank"&gt;event&lt;/A&gt; when token gets expired.&lt;/P&gt;&lt;P&gt;I know that I may refresh the token when expiration time comes but I think its better to handle this error because it more reliable and simple.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 10:08:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/support-the-expiration-of-token-in-android-app/m-p/575307#M3912</guid>
      <dc:creator>EduardLepner</dc:creator>
      <dc:date>2014-09-15T10:08:17Z</dc:date>
    </item>
  </channel>
</rss>

