I have been struggling to create a local database from an AGOL feature service with the Java Quartz Beta 2 SDK. This is a requirement for my project and I need some help in getting a hosted feature service into a database. I have gone over the guide and the sample code but there seem to be some errors.
1) geodatabaseSyncTask = new GeodatabaseSyncTask(FEATURE_SERVICE_URL, null); - There is no field for a null in the constructor
2) geodatabaseSyncTask.fetchFeatureServiceInfo(new CallbackListener<FeatureServiceInfo>() - There is not a fetchFeatureServiceInfo method, I have been getting the same result by using ArcGISFeatureServiceInfo class.
And so on...
I am only looking for a very simple code example on how to create a local database from an ArcGIS online hosted feature service. Could someone get me started?
And thanks for the previous help on getting to the service url the new Quartz rocks!!!
Since ArcGIS Runtime for Android and Java shares almost the same syntax, please follow these instructions: Sync offline edits—ArcGIS Runtime SDK for Android (Quartz Beta) | ArcGIS for Developers
Mind that GeodatabaseSyncTask constructor differs a bit..
Okay, thanks I am getting closer but still not quite there. I can't seem to create the database in the temp folder but I am able to check to the sync capability of the hosted feature service. Also,
with the code below I get as far as upDateStarted for the job status and don't seem to throw any exceptions. However, the temp folder is empty at the end of the process. I am wondering if the createDatabase() method is the problem. Note, I have to juggle a few different programming languages so I may missed something.
Thank you so much for help and I feel like I have made some headway. Here is the code I have been testing so far. For now, I am only interested in creating the database and not add the AGOL layers to a map. I think I can get over that hurdle when I get to it.