public void start() {
   File previewImageFile;
   previewImageFile = AppDirectory.getPreviewFile(new File(pendingHandle.toString()));
   setPendingPreviewGenerator(
       new OsmPreviewGenerator(scontext, pendingHandle.getGpxList(), previewImageFile));
   state.ping();
 }
    private GpxDatabase openDatabase() throws Exception {
      final File file = AppDirectory.getCacheDb(directory);
      final String query[] = {GpxDbConstants.KEY_FILENAME};

      dbAccessTime = file.lastModified();
      return new GpxDatabase(scontext, file, query);
    }
    private void removeFileFromDatabase(String name) throws IOException {
      final File file = new File(directory, name);

      AppDirectory.getPreviewFile(file).delete();
      database.deleteEntry(file);
    }