diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2014-05-17 16:16:41 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2014-05-17 16:16:41 +0200 |
| commit | e2d03264f63d644d72c369120d542969723398a1 (patch) | |
| tree | 0f45d5c89e74928c42386c8dbf79b54030b39099 /main/src/cgeo/geocaching/export/GpxExport.java | |
| parent | a32ebb0d12e3501b57c043d0912230acd807b228 (diff) | |
| download | cgeo-e2d03264f63d644d72c369120d542969723398a1.zip cgeo-e2d03264f63d644d72c369120d542969723398a1.tar.gz cgeo-e2d03264f63d644d72c369120d542969723398a1.tar.bz2 | |
#3818: enable memory dumps on demand
Diffstat (limited to 'main/src/cgeo/geocaching/export/GpxExport.java')
| -rw-r--r-- | main/src/cgeo/geocaching/export/GpxExport.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/main/src/cgeo/geocaching/export/GpxExport.java b/main/src/cgeo/geocaching/export/GpxExport.java index 08fca0b..bb0127a 100644 --- a/main/src/cgeo/geocaching/export/GpxExport.java +++ b/main/src/cgeo/geocaching/export/GpxExport.java @@ -8,6 +8,7 @@ import cgeo.geocaching.settings.Settings; import cgeo.geocaching.utils.AsyncTaskWithProgress; import cgeo.geocaching.utils.FileUtils; import cgeo.geocaching.utils.Log; +import cgeo.geocaching.utils.ShareUtils; import org.apache.commons.lang3.CharEncoding; @@ -15,8 +16,6 @@ import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; -import android.content.Intent; -import android.net.Uri; import android.os.Environment; import android.view.ContextThemeWrapper; import android.view.View; @@ -168,11 +167,8 @@ class GpxExport extends AbstractExport { if (exportFile != null) { ActivityMixin.showToast(activity, getName() + ' ' + getString(R.string.export_exportedto) + ": " + exportFile.toString()); if (Settings.getShareAfterExport()) { - final Intent shareIntent = new Intent(); - shareIntent.setAction(Intent.ACTION_SEND); - shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(exportFile)); - shareIntent.setType("application/xml"); - activity.startActivity(Intent.createChooser(shareIntent, getString(R.string.export_gpx_to))); + ShareUtils.share(activity, exportFile, + "application/xml", R.string.export_gpx_to); } } else { ActivityMixin.showToast(activity, getString(R.string.export_failed)); |
