fixed timestamps in gpx export

This commit is contained in:
y20k 2019-03-14 22:36:13 +01:00
parent 7a56a6cd61
commit 468e0c7ca8
2 changed files with 3 additions and 2 deletions

View file

@ -97,9 +97,9 @@ public final class ExportHelper extends FileProvider implements TrackbookKeys {
String authority = "org.y20k.trackbook.exporthelper.provider";
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setDataAndType(FileProvider.getUriForFile(context, authority, gpxFile), "application/gpx+xml");
intent.setType("application/gpx+xml");
intent.putExtra(Intent.EXTRA_STREAM, FileProvider.getUriForFile(context, authority, gpxFile));
intent.setData(FileProvider.getUriForFile(context, authority, gpxFile));
return intent;
}
@ -172,7 +172,7 @@ public final class ExportHelper extends FileProvider implements TrackbookKeys {
/* Creates Track */
private static String addTrack(Track track) {
StringBuilder gpxTrack = new StringBuilder("");
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US);
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US);
dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
// add opening track tag

View file

@ -40,6 +40,7 @@
android:layout_marginEnd="8dp"
android:backgroundTint="@color/trackbook_transparent"
android:contentDescription="@string/descr_export_button"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/share_button"
app:layout_constraintEnd_toStartOf="@+id/delete_button"
app:layout_constraintTop_toTopOf="@+id/share_button"