Import/export track UUID (necessary for synchronization).

If a track with a UUID is presented in OpenTracks, it cannot be imported again (enforced by database constraint).
Fixes #307.
This commit is contained in:
Dennis Guse
2020-07-06 20:20:46 +02:00
parent db1167ead5
commit f8afa9dbad
15 changed files with 246 additions and 482 deletions
@@ -205,9 +205,9 @@ public class ImportProgressDialogFragment extends DialogFragment {
if (TrackFileFormat.GPX.getExtension().equals(fileExtension)) {
trackImporter = new GpxFileTrackImporter(context);
} else if (TrackFileFormat.KML_WITH_TRACKDETAIL_AND_SENSORDATA.getExtension().equals(fileExtension)) {
trackImporter = new KmlFileTrackImporter(ImportProgressDialogFragment.this.getContext(), -1L);
trackImporter = new KmlFileTrackImporter(ImportProgressDialogFragment.this.getContext());
} else if (TrackFileFormat.KMZ_WITH_TRACKDETAIL_AND_SENSORDATA_AND_PICTURES.getExtension().equals(fileExtension)) {
trackImporter = new KmzTrackImporter(context, -1L, file.getUri());
trackImporter = new KmzTrackImporter(context, file.getUri());
} else {
Log.i(TAG, "Unsupported file format.");
return false;