From d8e23290ea537589619b7eff9bec6cec2cb195d9 Mon Sep 17 00:00:00 2001 From: Johannes-Kostas Goetzinger Date: Thu, 24 Sep 2015 17:59:05 +0200 Subject: [PATCH 1/2] changes mime type to application/gpx-xml - see https://en.wikipedia.org/wiki/GPS_Exchange_Format --- OpenGPSTracker/application/AndroidManifest.xml | 4 ++-- .../sogeti/android/gpstracker/actions/tasks/GpxCreator.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenGPSTracker/application/AndroidManifest.xml b/OpenGPSTracker/application/AndroidManifest.xml index cf966592..feffc370 100644 --- a/OpenGPSTracker/application/AndroidManifest.xml +++ b/OpenGPSTracker/application/AndroidManifest.xml @@ -122,7 +122,7 @@ - + - \ No newline at end of file + diff --git a/OpenGPSTracker/application/src/nl/sogeti/android/gpstracker/actions/tasks/GpxCreator.java b/OpenGPSTracker/application/src/nl/sogeti/android/gpstracker/actions/tasks/GpxCreator.java index 7f259b0e..3b563822 100644 --- a/OpenGPSTracker/application/src/nl/sogeti/android/gpstracker/actions/tasks/GpxCreator.java +++ b/OpenGPSTracker/application/src/nl/sogeti/android/gpstracker/actions/tasks/GpxCreator.java @@ -533,6 +533,6 @@ else if (mediaUri.getAuthority().equals("media")) @Override protected String getContentType() { - return needsBundling() ? "application/zip" : "text/xml"; + return needsBundling() ? "application/zip" : "application/gpx+xml"; } -} \ No newline at end of file +} From e140f8a003c02167511f9dab1a1f05f6315e120e Mon Sep 17 00:00:00 2001 From: Johannes-Kostas Goetzinger Date: Thu, 24 Sep 2015 17:59:48 +0200 Subject: [PATCH 2/2] fixes order of arguments when file sharing is initiated --- .../nl/sogeti/android/gpstracker/actions/tasks/GpxSharing.java | 2 +- .../nl/sogeti/android/gpstracker/actions/tasks/KmzSharing.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenGPSTracker/application/src/nl/sogeti/android/gpstracker/actions/tasks/GpxSharing.java b/OpenGPSTracker/application/src/nl/sogeti/android/gpstracker/actions/tasks/GpxSharing.java index 09d4569c..63129202 100644 --- a/OpenGPSTracker/application/src/nl/sogeti/android/gpstracker/actions/tasks/GpxSharing.java +++ b/OpenGPSTracker/application/src/nl/sogeti/android/gpstracker/actions/tasks/GpxSharing.java @@ -53,7 +53,7 @@ public GpxSharing(Context context, Uri trackUri, String chosenBaseFileName, bool protected void onPostExecute(Uri resultFilename) { super.onPostExecute(resultFilename); - ShareTrack.sendFile(mContext, resultFilename, mContext.getString(R.string.email_gpxbody), getContentType()); + ShareTrack.sendFile(mContext, resultFilename, getContentType(), mContext.getString(R.string.email_gpxbody)); } } diff --git a/OpenGPSTracker/application/src/nl/sogeti/android/gpstracker/actions/tasks/KmzSharing.java b/OpenGPSTracker/application/src/nl/sogeti/android/gpstracker/actions/tasks/KmzSharing.java index 2a35bca1..f708608d 100644 --- a/OpenGPSTracker/application/src/nl/sogeti/android/gpstracker/actions/tasks/KmzSharing.java +++ b/OpenGPSTracker/application/src/nl/sogeti/android/gpstracker/actions/tasks/KmzSharing.java @@ -52,7 +52,7 @@ public KmzSharing(Context context, Uri trackUri, String chosenFileName, Progress protected void onPostExecute(Uri resultFilename) { super.onPostExecute(resultFilename); - ShareTrack.sendFile(mContext, resultFilename, mContext.getString(R.string.email_kmzbody), getContentType()); + ShareTrack.sendFile(mContext, resultFilename, getContentType(), mContext.getString(R.string.email_kmzbody)); } }