I want to perform update and delete operation in a single applyEdits() call from my android application, my code is as below:
Thread.sleep(300);
layer.applyEdits(null, deletes, updates, new CallbackListener<FeatureEditResult[][]>() { ... });
I am able to perform the desired operation only before applying a certain sleep interval, if not, the deletes array gets passed as empty, and therefore, the delete and update operations does not take place in a single transaction.
Please provide your inputs.
Which version of the runtime are you working with?
it is :
com.esri.arcgis.android:arcgis-android:10.2.6-2
I would recommend updating to the latest 10.2.9 runtime as this has many security and vulnerability fixes included with it.
Are you perhaps updating the array asynchronously and not waiting for the update operation to finish before calling applyEdits()?
Thanks,
Alexander
Even after updating to the latest version (10.2.9), the problem persists.
I am not performing any asynchronous operation before calling applyEdits(). My 'updates' and 'deletes' arrays are formed completely before passing it to the applyEdits().
I still wonder as to which of the 'update' operation you are referring to?
Update operation was whatever you are doing to update the arrays. How many items are you trying to delete at once? What is the last call that you do before calling apply edits?
I am simply populating the update and delete arrays using two local methods which doesn't include any async call. It is using the locally stored Hashmap which has details of the graphics that I need to update/delete. There are almost 2-3 object id's that I am passing for deletion.
Moreover, I verified (performing debugging) that the updates and deletes arrays are having sufficient (or correct) data needed for a successful applyEdits operation. Also, the applyEdits works fine, but with a significant amount of delay which is what I am trying to avoid.