From bbcdeecc40603246887c1ffe02e6f57a695fe005 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Sat, 14 Jul 2012 12:08:48 +0200 Subject: [PATCH] Urls can now be sent to addfeedactivity from other apps --- AndroidManifest.xml | 8 +++++++- src/de/danoeh/antennapod/activity/AddFeedActivity.java | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index b1338e517..fd9c4fb10 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -30,7 +30,13 @@ + android:label="@string/add_new_feed_label" > + + + + + + diff --git a/src/de/danoeh/antennapod/activity/AddFeedActivity.java b/src/de/danoeh/antennapod/activity/AddFeedActivity.java index 433f8c2c3..76478480b 100644 --- a/src/de/danoeh/antennapod/activity/AddFeedActivity.java +++ b/src/de/danoeh/antennapod/activity/AddFeedActivity.java @@ -101,6 +101,16 @@ public class AddFeedActivity extends SherlockActivity { protected void onResume() { super.onResume(); StorageUtils.checkStorageAvailability(this); + Intent intent = getIntent(); + if (intent.getAction() != null && intent.getAction().equals(Intent.ACTION_SEND)) { + Log.d(TAG, "Was started with ACTION_SEND intent"); + String text = intent.getStringExtra(Intent.EXTRA_TEXT); + if (text != null) { + etxtFeedurl.setText(text); + } else { + Log.d(TAG, "No text was sent"); + } + } }