Merge pull request #3739 from txtd/feature-subscribe-on-android

Support for "Subscribe on Android"
This commit is contained in:
H. Lehmann 2020-01-09 17:01:42 +01:00 committed by GitHub
commit 5011d5847c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 4 deletions

View File

@ -236,7 +236,6 @@
android:value="de.danoeh.antennapod.activity.MainActivity"/>
<!-- URLs ending with '.xml' or '.rss' -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
@ -252,7 +251,6 @@
</intent-filter>
<!-- Feedburner URLs -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
@ -268,7 +266,6 @@
</intent-filter>
<!-- Files with mimeType rss/xml/atom -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
@ -284,7 +281,6 @@
</intent-filter>
<!-- Podcast protocols -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
@ -297,6 +293,21 @@
<data android:scheme="antennapod-subscribe"/>
</intent-filter>
<!-- Support for subscribeonandroid.com URLS -->
<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:pathPattern=".*\\..*/.*" />
<data android:host="subscribeonandroid.com" />
<data android:host="www.subscribeonandroid.com" />
<data android:host="*subscribeonandroid.com" />
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND"/>

View File

@ -134,6 +134,10 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
} else {
Log.d(TAG, "Activity was started with url " + feedUrl);
setLoadingLayout();
// Remove subscribeonandroid.com from feed URL in order to subscribe to the actual feed URL
if (feedUrl.contains("subscribeonandroid.com")) {
feedUrl = feedUrl.replaceFirst("((www.)?(subscribeonandroid.com/))", "");
}
if (savedInstanceState == null) {
startFeedDownload(feedUrl, null, null);
} else {