From 9a15545efe9f49f93181549ed8a02f8d476c4ca1 Mon Sep 17 00:00:00 2001 From: Nis Wechselberg Date: Sat, 4 May 2013 00:09:13 +0200 Subject: [PATCH] Adding AntennaPod as RSS/XML Reader --- AndroidManifest.xml | 31 +++++++++++++++++++ .../antennapod/activity/AddFeedActivity.java | 10 ++++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index fae6b862d..fc92ee4b6 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -55,6 +55,37 @@ android:configChanges="keyboardHidden|orientation" android:label="@string/add_new_feed_label" android:windowSoftInputMode="adjustResize" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/de/danoeh/antennapod/activity/AddFeedActivity.java b/src/de/danoeh/antennapod/activity/AddFeedActivity.java index 39434fa87..fc0d04f5a 100644 --- a/src/de/danoeh/antennapod/activity/AddFeedActivity.java +++ b/src/de/danoeh/antennapod/activity/AddFeedActivity.java @@ -44,8 +44,10 @@ public class AddFeedActivity extends SherlockActivity { @Override protected void onCreate(Bundle savedInstanceState) { + if (AppConfig.DEBUG) + Log.d(TAG, "Was started with Intent "+getIntent().getAction()+" and Data "+getIntent().getDataString()); setTheme(UserPreferences.getTheme()); - super.onCreate(savedInstanceState); + super.onCreate(savedInstanceState); getSupportActionBar().setDisplayHomeAsUpEnabled(true); StorageUtils.checkStorageAvailability(this); setContentView(R.layout.addfeed); @@ -54,6 +56,10 @@ public class AddFeedActivity extends SherlockActivity { progDialog = new ProgressDialog(this); etxtFeedurl = (EditText) findViewById(R.id.etxtFeedurl); + if (getIntent().getAction().equals(Intent.ACTION_VIEW)) { + etxtFeedurl.setText(getIntent().getDataString()); + } + butBrowseMiroGuide = (Button) findViewById(R.id.butBrowseMiroguide); butOpmlImport = (Button) findViewById(R.id.butOpmlImport); butConfirm = (Button) findViewById(R.id.butConfirm); @@ -101,7 +107,7 @@ public class AddFeedActivity extends SherlockActivity { if (intent.getAction() != null && intent.getAction().equals(Intent.ACTION_SEND)) { if (AppConfig.DEBUG) - Log.d(TAG, "Was started with ACTION_SEND intent"); + Log.d(TAG, "Resuming with ACTION_SEND intent"); String text = intent.getStringExtra(Intent.EXTRA_TEXT); if (text != null) { etxtFeedurl.setText(text);