<?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: How to delete feature using apply edits in Android API? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-delete-feature-using-apply-edits-in-android/m-p/63182#M455</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are not passing an accurate objectId in&amp;nbsp; your code. Can you get the objectID field value from the selection? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14468290242049860 jive_text_macro" data-renderedposition="50_8_912_32" jivemacro_uid="_14468290242049860"&gt;&lt;P&gt;graphicAttributes.put(arcGISFeatureLayer.getObjectIdField, SelectedGraphic.getAttributeValue(arcGISFeatureLayer.getObjectIdField));&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Nov 2015 16:56:09 GMT</pubDate>
    <dc:creator>DanO_Neill</dc:creator>
    <dc:date>2015-11-06T16:56:09Z</dc:date>
    <item>
      <title>How to delete feature using apply edits in Android API?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-delete-feature-using-apply-edits-in-android/m-p/63181#M454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to delete feature from feature layer using apply edits by passing a graphic array as input, but it is showing me the error &lt;STRONG&gt;'unable to complete operation, no adds,updates or deletes were specified'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Also, if I am passing the same graphic for update operation then it is being updated successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Following is the code snippet:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: black; font-size: 9.0pt; font-family: 'Courier New';"&gt;Map&amp;lt;Strin&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;g, Object&amp;gt; graphicAttributes = &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;new &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;HashMap&amp;lt;String, Object&amp;gt;();
&amp;nbsp; graphicAttributes.put(&lt;/SPAN&gt;&lt;SPAN style="color: green; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;"OBJECTID"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, 65);
 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;
&amp;nbsp; Graphic mfinalGraphic = &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;new &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Graphic(&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;null&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;null&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;graphicAttributes&lt;/SPAN&gt;);
 &lt;/SPAN&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;
&amp;nbsp; arcGISFeatureLayer.applyEdits(&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;null&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;new &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Graphic[]{mfinalGraphic}, &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;null&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;new &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;CallbackListener&amp;lt;FeatureEditResult[][]&amp;gt;() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: olive;"&gt;@Override
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;public void &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;onCallback(&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;final &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;FeatureEditResult[][] featureEditResults) {
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runOnUiThread(&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;new &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Runnable() {
&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;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: olive;"&gt;@Override
&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;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;public void &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;run() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Toast.&lt;EM&gt;makeText&lt;/EM&gt;(MainActivity.&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;this&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: green; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;"Successfully deleted"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, Toast.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM&gt;LENGTH_LONG&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;).show();&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; 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; } 
 
&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: olive;"&gt;@Override
&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;public void &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;onError(&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;final &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Throwable throwable) {
&amp;nbsp; runOnUiThread(&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;new &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Runnable() {
&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: olive;"&gt;@Override
&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;public void &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;run() {
&amp;nbsp; Toast.&lt;EM&gt;makeText&lt;/EM&gt;(MainActivity.&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;this&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: green; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;"Failed to delete"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, Toast.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM&gt;LENGTH_LONG&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;).show();&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;
&amp;nbsp; }
&amp;nbsp; });
&amp;nbsp; }&amp;nbsp; });&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;While tracking on fiddler, I am getting the following request:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;f=json&amp;amp;deletes=&amp;amp;token=BY26ICX0-KN....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is at rest end if I pass only the object id in f=json&amp;amp;deletes=7&amp;amp;token=BY26ICX0-KN.... then it is getting deleted successfully.&lt;BR /&gt;But there is no way of passing only object id in apply edit for delete part in Android API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for a positive reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:25:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-delete-feature-using-apply-edits-in-android/m-p/63181#M454</guid>
      <dc:creator>SuryaKant</dc:creator>
      <dc:date>2021-12-10T22:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete feature using apply edits in Android API?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-delete-feature-using-apply-edits-in-android/m-p/63182#M455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are not passing an accurate objectId in&amp;nbsp; your code. Can you get the objectID field value from the selection? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14468290242049860 jive_text_macro" data-renderedposition="50_8_912_32" jivemacro_uid="_14468290242049860"&gt;&lt;P&gt;graphicAttributes.put(arcGISFeatureLayer.getObjectIdField, SelectedGraphic.getAttributeValue(arcGISFeatureLayer.getObjectIdField));&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 16:56:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-delete-feature-using-apply-edits-in-android/m-p/63182#M455</guid>
      <dc:creator>DanO_Neill</dc:creator>
      <dc:date>2015-11-06T16:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete feature using apply edits in Android API?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-delete-feature-using-apply-edits-in-android/m-p/63183#M456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;@Dan O'Neill: I tried your code too but I want to delete the records from REST-end feature service like (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2F" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;server:port/arcgis/rest/folder_name/service_name/FeatureServer/0). Can we delete records directly from REST-end in Android? If yes, please help with the syntax.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 14:53:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-delete-feature-using-apply-edits-in-android/m-p/63183#M456</guid>
      <dc:creator>SuryaKant</dc:creator>
      <dc:date>2015-11-12T14:53:07Z</dc:date>
    </item>
  </channel>
</rss>

