When an offline geodatabase is created from a feature service, a replica is created on the server so that they can be synchronized. When the offline geodatabase is removed from the device, the replica can (should) be removed from the server as it is no longer required.
Does anyone have examples of how to go about unregistering the replica that was linked to a particular offline geodatabase?
I can't see any properties or methods of the Geodatabase object that might reveal the associated replica id. If we at least knew the replica id, then could use a NetworkRequest to unregister it.
Solved! Go to Solution.
When you create a geodatabase using GeodatabaseSyncTask::generateGeodatabase, the replica is created and the local database is ready to be edited and synced. If you don't any further syncs or you wanna share that geodatabase, you need to unregister it. It can be done by using [ GeodatabaseSyncTask::unregisterGeodatabase(Geodatabase geodatabase) ].
After that you can go ahead and delete the geodatabase. I hope this helps.