<?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 Services pattern: Downloading a map for offline use from hosted feature service? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/services-pattern-downloading-a-map-for-offline-use/m-p/524510#M3569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that all of the map objects that can be used to download a map&amp;nbsp;are constructed using&amp;nbsp;PortalItems in the&amp;nbsp;&lt;A href="https://developers.arcgis.com/android/latest/guide/create-an-offline-map.htm#ESRI_SECTION3_4C70B6AE44A0468D9DFF99719233447C"&gt;Create an offline map &lt;SPAN style="color: #3d3d3d;"&gt;guide&lt;/SPAN&gt;&lt;/A&gt;.&amp;nbsp;Is there a way to download a map to view offline using the Services pattern that is from a hosted feature service? Am I misreading the fact&amp;nbsp;that&amp;nbsp;you&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;&amp;nbsp;can allow feature service data to be downloaded, edited, and changes synchronized?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, when you view the map you have dowloaded offline, can you still enable popups to display the attributes of the features?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Apr 2018 01:37:18 GMT</pubDate>
    <dc:creator>CoraColeman</dc:creator>
    <dc:date>2018-04-16T01:37:18Z</dc:date>
    <item>
      <title>Services pattern: Downloading a map for offline use from hosted feature service?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/services-pattern-downloading-a-map-for-offline-use/m-p/524510#M3569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that all of the map objects that can be used to download a map&amp;nbsp;are constructed using&amp;nbsp;PortalItems in the&amp;nbsp;&lt;A href="https://developers.arcgis.com/android/latest/guide/create-an-offline-map.htm#ESRI_SECTION3_4C70B6AE44A0468D9DFF99719233447C"&gt;Create an offline map &lt;SPAN style="color: #3d3d3d;"&gt;guide&lt;/SPAN&gt;&lt;/A&gt;.&amp;nbsp;Is there a way to download a map to view offline using the Services pattern that is from a hosted feature service? Am I misreading the fact&amp;nbsp;that&amp;nbsp;you&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;&amp;nbsp;can allow feature service data to be downloaded, edited, and changes synchronized?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, when you view the map you have dowloaded offline, can you still enable popups to display the attributes of the features?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2018 01:37:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/services-pattern-downloading-a-map-for-offline-use/m-p/524510#M3569</guid>
      <dc:creator>CoraColeman</dc:creator>
      <dc:date>2018-04-16T01:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Services pattern: Downloading a map for offline use from hosted feature service?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/services-pattern-downloading-a-map-for-offline-use/m-p/524511#M3570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cora,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create an offline layer from a feature service, by using the GeodatabaseSyncTask. You can download features to a local geodatabase, then add a layer to a map based on these features. You can then make edits, and sync changes. Its slightly different to what we'd call an 'offline map' because it's only the features you're taking offline in this case, not the whole 'map'.&amp;nbsp;Hopefully this help topic should give you the info you need on this workflow - &lt;A class="link-titled" href="https://developers.arcgis.com/android/latest/guide/create-an-offline-layer.htm#GUID-C84B84E1-307F-4159-9A05-2E23A54A46F2" title="https://developers.arcgis.com/android/latest/guide/create-an-offline-layer.htm#GUID-C84B84E1-307F-4159-9A05-2E23A54A46F2"&gt;Create an offline layer—ArcGIS Runtime SDK for Android | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;. The downloaded features have their attribute values, so you can still set up pop-ups, for both offline layers, and offline maps, as far as I know. Note that in the task parameters you can specify if feature attachments are included in the offline data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Shelly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 08:51:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/services-pattern-downloading-a-map-for-offline-use/m-p/524511#M3570</guid>
      <dc:creator>ShellyGill1</dc:creator>
      <dc:date>2018-04-17T08:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Services pattern: Downloading a map for offline use from hosted feature service?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/services-pattern-downloading-a-map-for-offline-use/m-p/524512#M3571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your responses to my questions! I am implementing that sample code for creating an offline layer now but am running into some issues with&amp;nbsp;getting the default parameters for generating the geodatabase. Android Studio throws an error that there is an Invalid response around this chunk of code (createOfflineData() is declared last in the onCreate() method for this class (OfflineActivity.java):&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;private static void &lt;/SPAN&gt;createOfflineData() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080;"&gt;// create a new GeodatabaseSyncTask to create a local version of feature service data
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;String featureServiceUrl = &lt;SPAN style="color: #008000; font-weight: bold;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fservices8.arcgis.com%2FUT5WPtsyyxzDrV2P%2FArcGIS%2Frest%2Fservices%2FGNP_Fields%2FFeatureServer" target="_blank"&gt;https://services8.arcgis.com/UT5WPtsyyxzDrV2P/ArcGIS/rest/services/GNP_Fields/FeatureServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;GeodatabaseSyncTask gdbSyncTask = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;GeodatabaseSyncTask(featureServiceUrl);

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080;"&gt;// define an extent for the features to include
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Envelope extent = &lt;SPAN style="color: #660e7a;"&gt;aMapView&lt;/SPAN&gt;.getCurrentViewpoint(Viewpoint.Type.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;BOUNDING_GEOMETRY&lt;/SPAN&gt;).getTargetGeometry().getExtent();

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080;"&gt;// get the default parameters for generating a geodatabase
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ListenableFuture&amp;lt;GenerateGeodatabaseParameters&amp;gt; generateGdbParamsFuture = gdbSyncTask.createDefaultGenerateGeodatabaseParametersAsync(extent);
&amp;nbsp;&amp;nbsp;&amp;nbsp; generateGdbParamsFuture.addDoneListener(() -&amp;gt; {

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;try &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; GenerateGeodatabaseParameters generateGdbParams = &lt;SPAN style="color: #660e7a;"&gt;generateGdbParamsFuture&lt;/SPAN&gt;.get();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080;"&gt;&lt;STRONG&gt;// set the sync model to per layer *********OfflineActivity.java:89 is here********&lt;/STRONG&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&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;generateGdbParams.setSyncModel(SyncModel.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;PER_LAYER&lt;/SPAN&gt;);

.
.
.

W/System.err: java.util.concurrent.ExecutionException: com.esri.arcgisruntime.ArcGISRuntimeException: Invalid response
W/System.err: at com.esri.arcgisruntime.internal.a.b.get(SourceFile:128)
W/System.err: at com.example.corac.gnp_labels.OfflineActivity.lambda$createOfflineData$2$OfflineActivity(OfflineActivity.java:89)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:52:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/services-pattern-downloading-a-map-for-offline-use/m-p/524512#M3571</guid>
      <dc:creator>CoraColeman</dc:creator>
      <dc:date>2021-12-11T22:52:16Z</dc:date>
    </item>
  </channel>
</rss>

