I created mobile package with ArcGIS Pro, when I load it using ArcGIS Runtime SDK for .NET, I found that FeatureTable.IsEditable is always false.
How can I enable editing in feature layers in the mobile package (mmpk)?
You need to use OfflineMapTask.CreateAsync() method to generate MMPK file. In this way when the map is taken offline, it is stored as a mobile map. If the map contains sync-enabled feature layers, those can be edited offline as well, otherwise generated MMPK from Pro isn't editable.
Hope that helps. Thanks
I came across the same issue after creating a mobile map package from ArcGIS Pro for use on a mobile platform. I followed the sample code for CreateAsync(Map) to enable editing. The mmpk is loaded at runtime and does not have a portal reference. The user needs to be allowed to update the non-spatial attribute data in the feature class and their changes do not need to be sync'd back to a portal item - it is just used to demonstrate how changing the attributes changes the symbology on the map. I initially tried to use FeatureTable.UpdateFeatureAsync(feature) but received an error that the underlying map is readonly. Then I found this post. Now there is an error when trying to use CreateAsync - "Illegal state: The online map must have an item property which is its online portal item". I tried uploading the mmpk to ArcGIS Online, but keep receiving 502 errors during the upload.
Is there any way to make an already offline mobile map pacakge created from Pro available for editing of attributes (with no need to sync)?
Mobile map packages created with ArcGIS Pro are read only, not meant to be editable.
Thank you, Mark.
In that case, which format can we use to generate offline content for which the non-spatial attributes can be edited but not sync'd or persisted?
The only way to generate editable offline map package is through the OfflineMapTask. The link gives a pretty detailed example of how it is done. I believe the long term plan is to allow map packages developed in Pro to be editable, but it is not available at this time.
Thank you Joe - please see follow-up questions in Recreating editable FeatureDataGrid (WPF) in Xamarin/Android .
We have the need to edit packages offline on cellular or laptops (include geometries) and to post it back to the main database.
What is the correct way to do it currently?
I understand you need to write a program (in RunTime API) that will extract and create the package.
Then you can take the package to RunTime applications on mobile and edit it without network.
Then you need to sync it back - how?
Have you looked at Collector? If you don't have specific custom needs Collector will let you do what you decribe
As Joe suggested, take a look at Collector for Android/iOS as it may already offer what you you need.
To help understand the offline workflow I recommend starting with the Guide topic https://developers.arcgis.com/net/latest/wpf/guide/offline.htm.
If after evaluating Collector you still need to build a custom app I also recommend taking a looking the Data Collection example app build by the Runtime development team: https://developers.arcgis.com/example-apps/data-collection-dotnet/. The master branch currently contains a WPF app (there's a UWP version in progress in https://github.com/Esri/data-collection-dotnet/tree/uwp-attachments).
Thanks for the information.
I would like to explain what we need and what I understand from the docs so I understand the options.
Currently the users works on desktop, they build a complex project (rasters and vectors, some of them local on disk), set an area of interest and like to download it to the device.
Currently we use complex software on desktop to create the data for the mobile (caches and .geodatabase files) and we do not edit or return anything back to the organization database.
The user MUST have a custom application, no way to use any ready to use application (the needs are very specific).
From what I see on the on-demand workflow I understand that all data must be services and that I need to build the package for the cellular using RunTime application.
Is there a way (now or in coming version) to start a workflow in desktop (possibly Pro) and create an editable package for RunTime applications?
The standard workflow today would be to work in Portal or AGOL and create a WebMap that would be used as the source data. The user or admin could pre-package (see preplanned workflow) this data so the package does not have to be generated at the time of download which reduces download time significantly (generating a package takes 5+ minutes depending on size). Although, be aware that a single WebMap can only have 16 preplanned work areas which is both arbitrary and far too small (at least for the world I work in).
The other option is to do a custom process on the enterprise side. Yes, it is true that only a offline replica generated from a feature service is editable. But there is no requirement that this be generated on the device itself. You could develop a process to create your own offline packages on the enterprise and then a process to download those packages. If the packages are complex as you describe, this may be the only option. Also while Runtime does a nice job of simplifying this process, replicas can always be created directly from the rest endpoint. This custom approach is the path we are heading down, primarily because of the 16 prepackaged limit which is a good 10x less than the amount we need. Also, it gives us an ability to deliver additional data in the package which is a plus. We use an application run on the server to generate/update the offline packages which are stored on a web server. We have an application exposed as a rest endpoint that services client requests to download the prepackaged offline maps.
Retrieving data ...