Select to view content in your preferred language

importDeltaAsync doesn't apply data changes as edits and cannot perform upload sync

179
4
Jump to solution
09-13-2024 08:57 AM
NathanMeade
Emerging Contributor

When I call 

GeodatabaseSyncTask.importDeltaAsync(

I'm able to see that the delta data has been applied to my local Geodatabase file. When I call geodatabase.hasLocalEdits() it is false, however. I also cannot upload the data changes that were applied either. Is this expected behavior? Are you prevented from uploading delta changes that have been applied locally?

0 Kudos
1 Solution

Accepted Solutions
DiveshGoyal
Esri Regular Contributor

Your best bet would be to backup the entire geodatabase on the device and then rescue it from the SD card and sync.
Other than that, you can try directly calling the FeatureService Sync REST API uploading the delta, but that requires passing in some details like ServerGen which are only stored internally in the geodatabase

View solution in original post

4 Replies
DiveshGoyal
Esri Regular Contributor

This is expected behavior. The importDelta() function is a way to manually update the geodatabase with changes extracted from the service. These are not considered "local edits" that are performed on the device and need to be uploaded to the service.

Can you describe what are you are trying to achieve and how you were expecting to use importDelta() to achieve it? That'll help us provide some alternatives

0 Kudos
NathanMeade
Emerging Contributor

Thank you for your reply. 

What I am trying to achieve:

I am able to export deltas as a form of backup of local edits. I export these delta(s) to an SD Card. If the device breaks, the deltas can be retrieved from the SD Card if the SD Card didn't also break. This is helpful especially when the user is in an area where they do not have internet access.

What I'm trying to achieve is a way of then using that exported delta to upload those changes to the Feature Service.

0 Kudos
DiveshGoyal
Esri Regular Contributor

Your best bet would be to backup the entire geodatabase on the device and then rescue it from the SD card and sync.
Other than that, you can try directly calling the FeatureService Sync REST API uploading the delta, but that requires passing in some details like ServerGen which are only stored internally in the geodatabase

NathanMeade
Emerging Contributor

Good to know about the REST API with uploading the delta. Also good to know that the ServerGen from the original Geodatabase would be needed as well. Thanks @DiveshGoyal 

0 Kudos