Urls can now be sent to addfeedactivity from other apps
This commit is contained in:
parent
cbeeaa3766
commit
bbcdeecc40
|
@ -30,7 +30,13 @@
|
|||
</activity>
|
||||
<activity
|
||||
android:name="de.danoeh.antennapod.activity.AddFeedActivity"
|
||||
android:label="@string/add_new_feed_label" />
|
||||
android:label="@string/add_new_feed_label" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="de.danoeh.antennapod.activity.FeedItemlistActivity"
|
||||
android:configChanges="orientation|screenSize" />
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue