[Android developer] How to open pocket casts and import an rss feed?
-
Hi, this question is for the developers of the Pocket Casts Android app.
From my company’s Android app, we would like to programmatically open the Pocket Casts app AND import a given rss link.
I’m able to use implicit intent to open Pocket Casts, but I’m not able to import the rss link. I’m wondering if importing rss is supported with implicit intents, and if so, how to structure my intent correctly to make it work?
Here’s my code:
val rssUrl = "rss:www.patreon.com/rss/xyz..." cultiv8podcastnetwork?auth=M9rc7ffpEocIu-XJLLjWcGThFB_xd2hQ" val intent = android.content.Intent(android.content.Intent.ACTION_VIEW) intent.flags = FLAG_ACTIVITY_NEW_TASK intent.data = Uri.parse(rssUrl) intent.setPackage("au.com.shiftyjelly.pocketcasts") intent.addCategory(android.content.Intent.CATEGORY_BROWSABLE) if (intent.resolveActivity(packageManager) != null && activity != null) { activity.startActivity(intent) } -
I found out what the issue was. The rss link should start with “rss://www.patreon.com…”. I was missing the double forward slashes. I’m able to import the rss with this change!
-
Hi, I responded to you over the email before seeing this message. I’m glad that you worked it out!