Skip to content

Commit

Permalink
Update GPX mime-types
Browse files Browse the repository at this point in the history
Fix kmz and gpx sharing
As found in pull request #435
  • Loading branch information
rcgroot committed Oct 24, 2015
1 parent b51b16b commit c59a797
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
13 changes: 7 additions & 6 deletions studio/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="nl.sogeti.android.gpstracker"
xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
android:versionCode="85"
android:versionName="1.3.5">
<manifest
package="nl.sogeti.android.gpstracker"
xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
android:versionCode="85"
android:versionName="1.3.5">

<uses-sdk
android:minSdkVersion="4"
Expand Down Expand Up @@ -135,7 +136,7 @@
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>

<data android:mimeType="text/xml"/>
<data android:mimeType="application/gpx+xml"/>
</intent-filter>

<meta-data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,6 @@ private void serializeTrackPoints(XmlSerializer serializer, Uri waypoints) throw
@Override
protected String getContentType()
{
return needsBundling() ? "application/zip" : "text/xml";
return needsBundling() ? "application/zip" : "application/gpx+xml";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,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));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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));
}

}

0 comments on commit c59a797

Please sign in to comment.