<?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: AppLogin for secure data (Android Runtime SDK) in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306197#M2043</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This may not help this situation, but with internal ArcGIS Portal you would use the same credentials to login as you would use for federated services.&amp;nbsp; I have an Android application I wrote that does this exact thing with internal portal and relevant federated services.&amp;nbsp; This alleviates the issue of having to have users enter in credentials multiple times.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Aug 2020 19:53:53 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-08-07T19:53:53Z</dc:date>
    <item>
      <title>AppLogin for secure data (Android Runtime SDK)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306195#M2041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;BR /&gt;I need your help. I want to access protected arcgis data online (such as layers and squares) using an applogin and Android Runtime SDK approach (not showing an authorization window for the user), because the user has already been authorized in my application. It was mentioned here (https://community.esri.com/ideas/10944) that you can enable it.&lt;/P&gt;&lt;P&gt;Please tell me if there are now options for solving my problem?&lt;/P&gt;&lt;P&gt;If there is, please help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2020 07:36:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306195#M2041</guid>
      <dc:creator>БелыйАлександр</dc:creator>
      <dc:date>2020-08-05T07:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: AppLogin for secure data (Android Runtime SDK)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306196#M2042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've implemented a way to get a token using AppLogin for iOS in Swift.&amp;nbsp;Other customers have had success translating this approach to Android. Hopefully it will help:&amp;nbsp;&lt;A class="link-titled" href="https://gist.github.com/nixta/33afa1a17d7a9ea85f0d2d601e55a79f" title="https://gist.github.com/nixta/33afa1a17d7a9ea85f0d2d601e55a79f" rel="nofollow noopener noreferrer" target="_blank"&gt;App ID (swift codable) · GitHub&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: &lt;STRONG&gt;It is currently against our terms and conditions to use App Login to access private data services&lt;/STRONG&gt;. App Login is intended to allow access to our value add services such as routing, analysis, etc.. But we realize that there are some valid use cases where private data access via App Login is desirable and we're assessing this condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime, you could consider&amp;nbsp;creating ArcGIS Online layers with embedded credentials. See this document:&amp;nbsp;&lt;A class="link-titled" href="https://doc.arcgis.com/en/arcgis-online/reference/arcgis-server-services.htm#ESRI_SECTION1_FEB0DF92DA064B6A970DFB59A18AA4C2" title="https://doc.arcgis.com/en/arcgis-online/reference/arcgis-server-services.htm#ESRI_SECTION1_FEB0DF92DA064B6A970DFB59A18AA4C2" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Server web services—ArcGIS Online Help | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short, for each private layer you create a new ArcGIS Online item that combines the service URL for the layer with&amp;nbsp;embedded credentials. You can then go to the item settings for the new item and limit access by specifying referer URLs. Then share the item publicly and ensure your app uses the correct referer URL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I've created a version of the traffic layer with embedded credentials:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/502462_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I went into the new item's settings, shared it publicly, and limited access by referer:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/502487_pastedImage_5.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly in my app, I set the "Referer" for requests on that layer to match the text above. You do this by settings a &lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/io/RequestConfiguration.html" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;STRONG&gt;RequestConfiguration&lt;/STRONG&gt;&lt;/A&gt; and calling&amp;nbsp;&lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/io/RequestConfiguration.html#setHeaders(java.util.Map)" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;STRONG&gt;setHeaders()&lt;/STRONG&gt;&lt;/A&gt;. You could modify the global RequestConfiguration if you prefer, but in this case I wanted to be more explicit. Here's how I do this in Swift with the ArcGIS Runtime SDK for iOS. It should work the same for Android:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; layer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;AGSArcGISMapImageLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;AGSPortalItem&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;portal&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;arcGISOnline&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;withLoginRequired&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                               itemID&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"&amp;lt;ITEM ID TO MY NEW ITEM WITH STORED CREDENTIALS&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; rc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; AGSRequestConfiguration&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;global&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;copy&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt; AGSRequestConfiguration &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  rc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;userHeaders &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Referer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"myCustomApp://iCanUseStoredCredentials"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
  layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;requestConfiguration &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; rc
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You would choose a Referer string of your own that's kept secret. And you should decide for yourself if this provides enough security for your data. If that referer string and the item ID/URL leak, then anyone with that info could access the service.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:39:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306196#M2042</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2021-12-11T14:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: AppLogin for secure data (Android Runtime SDK)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306197#M2043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This may not help this situation, but with internal ArcGIS Portal you would use the same credentials to login as you would use for federated services.&amp;nbsp; I have an Android application I wrote that does this exact thing with internal portal and relevant federated services.&amp;nbsp; This alleviates the issue of having to have users enter in credentials multiple times.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2020 19:53:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306197#M2043</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-07T19:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: AppLogin for secure data (Android Runtime SDK)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306198#M2044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!!&lt;BR /&gt;Сould you please share your solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2020 07:36:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306198#M2044</guid>
      <dc:creator>БелыйАлександр</dc:creator>
      <dc:date>2020-08-10T07:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: AppLogin for secure data (Android Runtime SDK)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306199#M2045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for the answer!&lt;BR /&gt;Please tell me, what about direct access to arcgis online (not to the service), I need it to download areas (in this case, I provide the link to the portal and id maps - https://developers.arcgis.com/android/latest/guide/take-map-offline-preplanned.htm). Can I access the &lt;SPAN&gt;areas&amp;nbsp;&lt;/SPAN&gt;using AppLogin?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2020 07:43:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306199#M2045</guid>
      <dc:creator>БелыйАлександр</dc:creator>
      <dc:date>2020-08-10T07:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: AppLogin for secure data (Android Runtime SDK)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306200#M2046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, yes, you can use App Login to work directly with ArcGIS Online. However, when you are dealing with sharing between groups and organizations, you may encounter limitations (think of App Login as&amp;nbsp;designed for targeted direct access, without a particular user identity behind it).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately there is currently a limitation in ArcGIS Online which prevents the preplanned offline workflow working with App Login. We're investigating and I'm hoping that we can get this resolved with the next update&amp;nbsp;to ArcGIS Online.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2020 15:03:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/applogin-for-secure-data-android-runtime-sdk/m-p/306200#M2046</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2020-08-10T15:03:44Z</dc:date>
    </item>
  </channel>
</rss>

