Hi,
I am using following code snippet to download basemap. But I am getting "Error performing submit job operation for Export Cache" error in vEstimateTileCacheSizeJob.addJobDoneListener(new Runnable() position. Can anybody pinpoint what might be the reason for this issue.
final ListenableFuture<ExportTileCacheParameters> vExportTileCacheParameterFuture = vExportTileCacheTask.createDefaultExportTileCacheParametersAsync(vExtentEnvelope, 0.0, 0.0); vExportTileCacheParameterFuture.addDoneListener(new Runnable() { @Override public void run() { try { final ExportTileCacheParameters vExportTileCacheParameters = vExportTileCacheParameterFuture.get(); if(vExportTileCacheParameters == null) { //...... } final EstimateTileCacheSizeJob vEstimateTileCacheSizeJob = vExportTileCacheTask.estimateTileCacheSizeAsync(vExportTileCacheParameters); vEstimateTileCacheSizeJob.setRequestConfiguration(getRequestConfiguration(300)); //..... // start the job to EstimateTileCacheSize mJobInProgress = vEstimateTileCacheSizeJob; vEstimateTileCacheSizeJob.start(); vEstimateTileCacheSizeJob.addJobChangedListener(new Runnable() { @Override public void run() { //....... } }); vEstimateTileCacheSizeJob.addJobDoneListener(new Runnable() { @Override public void run() { if (vEstimateTileCacheSizeJob.getStatus() == Job.Status.SUCCEEDED) { EstimateTileCacheSizeResult vEstimateTileCacheSizeResult = vEstimateTileCacheSizeJob.getResult(); if(vEstimateTileCacheSizeResult == null) { handleSyncError("","An unknown error occured while estimating cache size."); return; } Long vEstimatedFileSize = vEstimateTileCacheSizeResult.getFileSize(); updateLog("Estimated BaseMap File Size : " + String.valueOf(vEstimatedFileSize)); Long vAvailableFreeSpace = Environment.getExternalStorageDirectory().getFreeSpace(); updateLog("Available Device Free Space : " + String.valueOf(vAvailableFreeSpace)); if (vEstimatedFileSize >= 0 && vAvailableFreeSpace > vEstimatedFileSize) { // download base map final String vBaseMapDestinationPath = DBAdmin.getBaseMapPath(); final ExportTileCacheJob vExportTileCacheJob = vExportTileCacheTask.exportTileCacheAsync(vExportTileCacheParameters, vBaseMapDestinationPath); vExportTileCacheJob.setRequestConfiguration(getRequestConfiguration(600)); // start the job to Export TileCache vExportTileCacheJob.start(); mJobInProgress = vExportTileCacheJob; vExportTileCacheJob.addJobChangedListener(new Runnable() { @Override public void run() { //....... } }); vExportTileCacheJob.addJobDoneListener(new Runnable() { @Override public void run() { if (vExportTileCacheJob.getStatus() == Job.Status.SUCCEEDED) { //....... } else { handleSyncError("An error occured while downloading the basemap: " + mJobInProgress.getError().getAdditionalMessage(), "Could not download the basemap."); } } }); } else { handleSyncError("", "Not enough space on device to download Basemap."); } } else { handleSyncError("An error occured while estimating cache size: " + vEstimateTileCacheSizeJob.getError().getAdditionalMessage(), "An error occured while estimating cache size. Ensure that the Basemap is available and that the requested LODs and/or extent do not exceed the servers export tile limit."); } } }); }