summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNis Wechselberg <webmaster@enbewe.de>2013-05-04 00:09:13 +0200
committerNis Wechselberg <webmaster@enbewe.de>2013-05-04 00:09:13 +0200
commit9a15545efe9f49f93181549ed8a02f8d476c4ca1 (patch)
treefc79fb17bb503d5f4a72a4c69d1f92867fa8b51b
parent6bbde80dd0c21649b9b1b649b16ff61351d3eb9c (diff)
downloadAntennaPod-9a15545efe9f49f93181549ed8a02f8d476c4ca1.zip
Adding AntennaPod as RSS/XML Reader
-rw-r--r--AndroidManifest.xml31
-rw-r--r--src/de/danoeh/antennapod/activity/AddFeedActivity.java10
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
@@ -56,6 +56,37 @@
android:label="@string/add_new_feed_label"
android:windowSoftInputMode="adjustResize" >
<intent-filter>
+ <action android:name="android.intent.action.VIEW"/>
+ <category android:name="android.intent.category.DEFAULT"/>
+ <category android:name="android.intent.category.BROWSABLE"/>
+ <data android:scheme="http"/>
+ <data android:host="*"/>
+ <data android:pathPattern=".*\\.xml"/>
+ <data android:pathPattern=".*\\.rss"/>
+ </intent-filter>
+
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW"/>
+ <category android:name="android.intent.category.DEFAULT"/>
+ <category android:name="android.intent.category.BROWSABLE"/>
+ <data android:scheme="http"/>
+ <data android:host="feeds.feedburner.com"/>
+ <data android:host="feedproxy.google.com"/>
+ <data android:host="feeds2.feedburner.com"/>
+ <data android:host="feedsproxy.google.com"/>
+ </intent-filter>
+
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW"/>
+ <category android:name="android.intent.category.DEFAULT"/>
+ <category android:name="android.intent.category.BROWSABLE"/>
+ <data android:scheme="http"/>
+ <data android:mimeType="text/xml"/>
+ <data android:mimeType="application/rss+xml"/>
+ <data android:mimeType="application/atom+xml"/>
+ <data android:mimeType="application/xml"/>
+ </intent-filter>
+ <intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
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);