I want to develop Android application manipulating geodatabase (SDE). Application needs to read/modify attachments gathered by "Collector" (photos) and modify additional feature attributes. The geodatabase is on MSSQL Server Express hosted inside our company (on-premises). This geodatabase contains our own data in custom attributes. So far, I was accessing this database directly (using ADO.NET) from Windows desktop applications without usage of any ESRI API or ESRI libraries.
1) What is the preferred technology for this application:
2) I see in the database how Collector attachments are connected to feature class (using AttachmentID), but I would like to make more "legal", API access to them. Can somebody point me to documentation/training/samples where I can study API manipulating Attachments and how to modify SDE geodatabase from Android? I am new to ESRI API and would like your help to show me where to start ESRI API education to achieve the above goal.
3) Is "Essentials Developer Subsciption" enough for this task?
Solved! Go to Solution.
While it's probably technically possible to modify the backing data directly, I'd advice heavily against it, as there's some finicky database relationships behind a feature server. Attachments should be edited via a feature service endpoint to ensure data consistency.
So you would be using the ServiceFeatureTable class to connect to that feature service, query its features, and there's then attachment operations on these features (this is also what the Collector apps are doing).
Thank you Morten for the response. I can can create ServiceFeatureTable:
ServiceFeatureTable table = new ServiceFeatureTable(uri);
The documentation describes working with attachemtns:
and API reference describes function QueryAttachmentsAsync:
However Esri.ArcGISRuntime.dll in version 220.127.116.11 does not contain this function.
'ServiceFeatureTable' does not contain a definition for 'QueryAttachmentsAsync'
I have reinstalled ArcGIS_Runtime_SDK_DotNet_100_2_1.vsix and it did not help. Any suggestions?
The method is on the ArcGISFeature: GetAttachmentsAsync.
So you'd first query for the feature you're interested in, then call GetAttachmentsAsync on it. It also has the methods for add, update and delete attachments.