This commit is contained in:
Victor Shcherb 2016-08-03 17:13:54 +02:00
parent 809fe75d94
commit ceecee6c8e
2 changed files with 3 additions and 3 deletions

View file

@ -503,7 +503,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
Algorithms.fileCopy(src, dst); Algorithms.fileCopy(src, dst);
final Intent sendIntent = new Intent(); final Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND); sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "Favourites.gpx:\n\n\n" + GPXUtilities.asString(gpxFile, getMyApplication())); sendIntent.putExtra(Intent.EXTRA_TEXT, "Content of the attached file Favourites.gpx:\n\n\n" + GPXUtilities.asString(gpxFile, getMyApplication()));
sendIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.share_fav_subject)); sendIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.share_fav_subject));
sendIntent.putExtra(Intent.EXTRA_STREAM, sendIntent.putExtra(Intent.EXTRA_STREAM,
FileProvider.getUriForFile(getActivity(), FileProvider.getUriForFile(getActivity(),

View file

@ -234,14 +234,14 @@ public class NotesFragment extends OsmAndListFragment {
if(path == shareLocationFile) { if(path == shareLocationFile) {
File fl = generateGPXForRecordings(selected); File fl = generateGPXForRecordings(selected);
if(fl != null) { if(fl != null) {
files.add(FileProvider.getUriForFile(getActivity(), "net.osmand.fileprovider", fl)); files.add(FileProvider.getUriForFile(getActivity(), getActivity().getPackageName() + ".fileprovider", fl));
} }
} else { } else {
File src = path.getFile(); File src = path.getFile();
File dst = new File(getActivity().getCacheDir(), "share/"+src.getName()); File dst = new File(getActivity().getCacheDir(), "share/"+src.getName());
try { try {
Algorithms.fileCopy(src, dst); Algorithms.fileCopy(src, dst);
files.add(FileProvider.getUriForFile(getActivity(), "net.osmand.fileprovider", dst)); files.add(FileProvider.getUriForFile(getActivity(), getActivity().getPackageName() + ".fileprovider", dst));
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }