<?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: Offline changes synchronization in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/offline-changes-synchronization/m-p/346010#M2232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Looks like facing same problem, however with android sdk (latest) + basic licence. Was the problem solved?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Oct 2018 06:46:39 GMT</pubDate>
    <dc:creator>RafalKordalski</dc:creator>
    <dc:date>2018-10-11T06:46:39Z</dc:date>
    <item>
      <title>Offline changes synchronization</title>
      <link>https://community.esri.com/t5/developers-questions/offline-changes-synchronization/m-p/346009#M2231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;In my WPF application I’m trying to use off-line map functionality. Right now my feature service is configured for data sync and I’m able to create data replica on server and download local copy of geodatabase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;gdbSyncTask = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;await&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt; GeodatabaseSyncTask.CreateAsync(_featureServiceUri);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;Envelope extent = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt; Envelope(xmin, ymin, xmax, ymax, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt; SpatialReference(wkidStart));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;GenerateGeodatabaseParameters generateParams = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;await&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt; _gdbSyncTask.CreateDefaultGenerateGeodatabaseParametersAsync(extent);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;_generateGdbJob = _gdbSyncTask.GenerateGeodatabase(generateParams, _gdbPath);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;_generateGdbJob.JobChanged += GenerateGdbJobChanged;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;_generateGdbJob.ProgressChanged += ((&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;object&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt; sender, EventArgs e) =&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; text-indent: 36.0pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;UpdateProgressBar();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;_generateGdbJob.Start();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After initial synchronization, I’m able to successfully work with map in off-line mode. This includes operations like adding new geometries or editing existing polygons inside local DB.&lt;/P&gt;&lt;P&gt;However, when I’m trying to synchronize changes back to server – I’m getting no results.&lt;/P&gt;&lt;P&gt;To perform data synchronization with local database – I’m using the following code:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;SyncGeodatabaseParameters parameters = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt; SyncGeodatabaseParameters()&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; text-indent: 36.0pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;GeodatabaseSyncDirection = SyncDirection.Bidirectional,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; text-indent: 36.0pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;RollbackOnFailure = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;false&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&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; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;Geodatabase gdb = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;await&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt; Geodatabase.OpenAsync(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;.GetGdbPath());&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt; (GeodatabaseFeatureTable table &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt; gdb.GeodatabaseFeatureTables)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; text-indent: 36.0pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;long&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt; id = table.ServiceLayerId;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; text-indent: 36.0pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;SyncLayerOption option = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt; SyncLayerOption(id);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; text-indent: 36.0pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;option.SyncDirection = SyncDirection.Bidirectional; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; text-indent: 36.0pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;parameters.LayerOptions.Add(option);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;_gdbSyncTask = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: blue;"&gt;await&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt; GeodatabaseSyncTask.CreateAsync(_featureServiceUri);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;SyncGeodatabaseJob job = _gdbSyncTask.SyncGeodatabase(parameters, gdb);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;job.JobChanged += SyncJob_JobChanged;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;job.ProgressChanged += SyncJob_ProgressChanged;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;job.Start();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything goes well. The synchronization ends with status “Succeeded”. The messages logged by the SyncGeodatabaseJob are like on the screen below:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/396017_1.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;However – when I open edited feature layer from server inside map web client I cannot found any of my local changes. &amp;nbsp;In the serve database I can also see that no new records were created during synchronization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interesting think is that when I open “Replica” data inside web I can see the following information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; background: white; font-size: 11.0pt;"&gt;Replica Server Gen:&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;2&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; background: white; font-size: 11.0pt;"&gt;Creation Date:&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp;2018/02/07 10:49:54 UTC&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; background: white; font-size: 11.0pt;"&gt;Last Sync Date:&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp;2018/02/07 10:49:54 UTC&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The “Last Sync Data” is equal to replica “Creation date” &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/alert.png" /&gt; However, in the replica log in ArcMap I can see the following information:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/396018_2.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Can anyone can tell me how should I interpret above described situation? Am I missing some steps in my code? Or maybe some configuration feature is missing on the server? It looks like data modifications are successfully pushed back to replica on server but after that replica is not synchronized with server database (should it work automatically?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m# a “fresh” person regarding ArcGis development so any help will be appreciated&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2018 12:35:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/offline-changes-synchronization/m-p/346009#M2231</guid>
      <dc:creator>PiotrekGaszewski</dc:creator>
      <dc:date>2018-02-07T12:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Offline changes synchronization</title>
      <link>https://community.esri.com/t5/developers-questions/offline-changes-synchronization/m-p/346010#M2232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Looks like facing same problem, however with android sdk (latest) + basic licence. Was the problem solved?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 06:46:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/offline-changes-synchronization/m-p/346010#M2232</guid>
      <dc:creator>RafalKordalski</dc:creator>
      <dc:date>2018-10-11T06:46:39Z</dc:date>
    </item>
  </channel>
</rss>

