UnregisterGeodatabaseAsync

213
0
05-25-2021 04:43 PM
PhilScovis
New Contributor III

Hello, 

We are downloading offline feature layers for use in our application.  Following the "best practices" in the example here:

https://developers.arcgis.com/net/android/api-reference/html/T_Esri_ArcGISRuntime_Tasks_Offline_Geod...

I am calling UnregisterGeodatabaseAsync following successful creation of the offline download.  However, this call throws an error "Unable to complete operation."  The details in the exception are "Cannot access the replica".

Why would the server not be able to access the replica?  Did it create one? How can I find out what is going on?  

GenerateGeodatabaseJob job = gdbSyncTask.GenerateGeodatabase(generateGdbParams, nativeOfflinePath);
Geodatabase geodatabase = null;
try
{
await job.GetResultAsync();
geodatabase = job.GetResultAsync().Result;
}
finally
{
if (job.Status == JobStatus.Succeeded && geodatabase != null)
{
try
{
await gdbSyncTask.UnregisterGeodatabaseAsync(geodatabase);
}
catch (Exception ex)
{
  // WHAT?
}
}
}

 

Tags (2)
0 Kudos
0 Replies