<?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 Solved: Problem Updating ArcGISFeatureLayer in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/solved-problem-updating-arcgisfeaturelayer/m-p/107252#M781</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a problem when i'm trying to update my featurelayer after changing the position or some attribute values of a feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First i'm retrieving the updated graphics from my local database:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;ArcGISFeatureLayer syncLayer = new ArcGISFeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;server&amp;gt;/ArcGIS/rest/services/&amp;lt;directory&amp;gt;/&amp;lt;service&amp;gt;/FeatureServer/0",o,cred);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;edits = builder.getBaumdatenAsGraphic(getApplicationContext(), "1",new Hashtable&amp;lt;String,Object&amp;gt;());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this method im filling the Hashtable with values:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.put("OBJECTID", baeume.get(i).getOBJECTID());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.put(BK_BAEUME_ADATUM, baeume.get(i).getADatum());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And afterwards i'm generating the Graphic:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;InfoTemplate info = new InfoTemplate();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;graphics&lt;I&gt; = new Graphic(new Point(baeume.get(i).getX(),baeume.get(i).getY()),pms,map,info);&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then i'm calling applyEdits from my FeatureLayer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;syncLayer.applyEdits(adds, deletes, edits, new CallbackListener&amp;lt;FeatureEditResult[][]&amp;gt;(){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// some Callback-Handling&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On my device i get now the message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[objectid=-32648,globalid=null, success=false,error=FeatureEditError[code=-1, description=Update for the object was not attempted. Object may not exists.]]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's possible that the objectid is incorrect? I retrieve it from the featurelayer when initializing the data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jan 2013 13:38:38 GMT</pubDate>
    <dc:creator>KevinGebhardt</dc:creator>
    <dc:date>2013-01-31T13:38:38Z</dc:date>
    <item>
      <title>Solved: Problem Updating ArcGISFeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/solved-problem-updating-arcgisfeaturelayer/m-p/107252#M781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a problem when i'm trying to update my featurelayer after changing the position or some attribute values of a feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First i'm retrieving the updated graphics from my local database:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;ArcGISFeatureLayer syncLayer = new ArcGISFeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;server&amp;gt;/ArcGIS/rest/services/&amp;lt;directory&amp;gt;/&amp;lt;service&amp;gt;/FeatureServer/0",o,cred);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;edits = builder.getBaumdatenAsGraphic(getApplicationContext(), "1",new Hashtable&amp;lt;String,Object&amp;gt;());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this method im filling the Hashtable with values:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.put("OBJECTID", baeume.get(i).getOBJECTID());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.put(BK_BAEUME_ADATUM, baeume.get(i).getADatum());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And afterwards i'm generating the Graphic:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;InfoTemplate info = new InfoTemplate();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;graphics&lt;I&gt; = new Graphic(new Point(baeume.get(i).getX(),baeume.get(i).getY()),pms,map,info);&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then i'm calling applyEdits from my FeatureLayer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;syncLayer.applyEdits(adds, deletes, edits, new CallbackListener&amp;lt;FeatureEditResult[][]&amp;gt;(){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// some Callback-Handling&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On my device i get now the message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[objectid=-32648,globalid=null, success=false,error=FeatureEditError[code=-1, description=Update for the object was not attempted. Object may not exists.]]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's possible that the objectid is incorrect? I retrieve it from the featurelayer when initializing the data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 13:38:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/solved-problem-updating-arcgisfeaturelayer/m-p/107252#M781</guid>
      <dc:creator>KevinGebhardt</dc:creator>
      <dc:date>2013-01-31T13:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Updating ArcGISFeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/solved-problem-updating-arcgisfeaturelayer/m-p/107253#M782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I solved my problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map.put("OBJECTID", baeume.get(i).getOBJECTID());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the ObjectID in my local Data was String and not integer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After fixing it, it works&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 05:36:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/solved-problem-updating-arcgisfeaturelayer/m-p/107253#M782</guid>
      <dc:creator>KevinGebhardt</dc:creator>
      <dc:date>2013-02-01T05:36:29Z</dc:date>
    </item>
  </channel>
</rss>

