The feature service does not support geodatabase sync

1117
2
12-02-2018 09:31 PM
DevendraKhatri
New Contributor III

I am working on an android app that should have offline capabilities like getting map and edit the features. I have access to just ArcGIS online and ArcGIS developer portal. I do not have the ArcGIS Desktop access.

I am using Android Run-time SDK to achieve this, I have created map area for the web map in ArcGIS online and through SDK I can fetch the map-area but I am not able to generate the Geo-database for the feature. It gives me a run time exception "The feature service does not support geodatabase sync" .

Following line is giving me Runtime Exception:

GenerateGeodatabaseParameters parameters = defaultParameters.get();

 I am stuck at this point, not able to proceed further, need to know if I am missing any configuration or is there any other way to achieve this.

0 Kudos
2 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Devendra,

In ArcGIS Online, navigate to the feature service and click on the Settings tab.  You can enable sync there:

0 Kudos
DevendraKhatri
New Contributor III

Thanks for the response.

I have already enabled this. 

Sync enabled for hosted feature layer

I would like elaborate more in this concern:

STEP 1:

I get map area using:

ListenableFuture<List<PreplannedMapArea>> mapAreasFuture = offlineMapTask.getPreplannedMapAreasAsync();

I download map area using: 

DownloadPreplannedOfflineMapJob job = offlineMapTask.downloadPreplannedOfflineMap(mapArea, mmpkFilePath);

Map area files that get downloaded are in 3 formats [ .mmap, .geodatabase, .tpk]

STEP 2:

I use following sample to generate geodatabase from the .tpk file and .geodatabase file. I am not sure about the uses of .mmap file.

arcgis-runtime-samples-android/java/edit-and-sync-features at master · Esri/arcgis-runtime-samples-a... 

and that's where I get exception while generating geodatabse.

Note: 

GeodatabaseSyncTask.getFeatureServiceInfo().isSyncEnabled() is returning me 'false' everytime
0 Kudos