@Nullable
    private FieldNotes createFieldNotes(final Geocache[] caches) {
        final FieldNotes fieldNotes = new FieldNotes();
        try {
            for (final Geocache cache : caches) {
                if (cache.hasLogOffline()) {
                    final LogEntry log = DataStore.loadLogOffline(cache.getGeocode());
                    if (log != null && (!onlyNew || log.date > Settings.getFieldnoteExportDate())) {
                        fieldNotes.add(cache, log);
                    }
                }
                publishProgress(fieldNotes.size());
            }
        } catch (final Exception e) {
            Log.e("FieldNoteExport.ExportTask generation", e);
            return null;
        }
        return fieldNotes;
    }
Instantiates and configures the task for exporting field notes.

@param activity optional: Show a progress bar and toasts
@param upload   Upload the Field Note to geocaching.com
@param onlyNew  Upload/export only new logs since last export
main/src/main/java/cgeo/geocaching/export/FieldNoteExportTask.java