diff options
author | Tom Hennen <TomHennen@users.noreply.github.com> | 2015-09-09 18:35:58 -0400 |
---|---|---|
committer | Tom Hennen <TomHennen@users.noreply.github.com> | 2015-09-09 18:35:58 -0400 |
commit | cde0dfc2905d65fb4e4ea7f2a68f75b76b06aef5 (patch) | |
tree | 0097f9bf4bddba928f307da53e08839794bdfe2b /app/src/main | |
parent | 6c6d7e4e31202248d6287ea5eb47f09b917ef118 (diff) | |
parent | 159f1f6dcc9743462fd17a3fb5f435ecf14ee054 (diff) | |
download | AntennaPod-cde0dfc2905d65fb4e4ea7f2a68f75b76b06aef5.zip |
Merge pull request #1179 from TomHennen/export_updates
Add option to share OPML file when exporting it
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/AndroidManifest.xml | 4 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/asynctask/OpmlExportWorker.java | 14 |
2 files changed, 15 insertions, 3 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 72e7752b1..117a008a8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="de.danoeh.antennapod" - android:versionCode="1030204" - android:versionName="1.3.2"> + android:versionCode="1040000" + android:versionName="1.4.0.0"> <!-- Version code schema: "1.2.3-SNAPSHOT" -> 1020300 diff --git a/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlExportWorker.java b/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlExportWorker.java index 6bba956a6..f12b0fe3a 100644 --- a/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlExportWorker.java +++ b/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlExportWorker.java @@ -5,6 +5,8 @@ import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; +import android.content.Intent; +import android.net.Uri; import android.os.AsyncTask; import android.util.Log; @@ -93,7 +95,17 @@ public class OpmlExportWorker extends AsyncTask<Void, Void, Void> { alert.setTitle(R.string.opml_export_success_title); alert.setMessage(context .getString(R.string.opml_export_success_sum) - + output.toString()); + + output.toString()) + .setPositiveButton(R.string.send_label, (dialog, which) -> { + Uri outputUri = Uri.fromFile(output); + Intent sendIntent = new Intent(Intent.ACTION_SEND); + sendIntent.putExtra(Intent.EXTRA_SUBJECT, + context.getResources().getText(R.string.opml_export_label)); + sendIntent.putExtra(Intent.EXTRA_STREAM, outputUri); + sendIntent.setType("text/plain"); + context.startActivity(Intent.createChooser(sendIntent, + context.getResources().getText(R.string.send_label))); + }); } alert.create().show(); } |