Merge pull request #1179 from TomHennen/export_updates

Add option to share OPML file when exporting it
This commit is contained in:
Tom Hennen 2015-09-09 18:35:58 -04:00
commit cde0dfc290
3 changed files with 16 additions and 3 deletions

View File

@ -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

View File

@ -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();
}

View File

@ -85,6 +85,7 @@
<string name="feed_auto_download_global">Global</string>
<string name="feed_auto_download_always">Always</string>
<string name="feed_auto_download_never">Never</string>
<string name="send_label">Send...</string>
<!-- 'Add Feed' Activity labels -->
<string name="feedurl_label">Feed URL</string>