summaryrefslogtreecommitdiff
path: root/ui/app-start-intent
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-03-29 13:38:31 +0100
committerGitHub <noreply@github.com>2024-03-29 13:38:31 +0100
commit8f553f08f0347b73b34c80dddef228302cdf5977 (patch)
tree112ef05988be5a37bb08ec2aa06ed3727234bbae /ui/app-start-intent
parent5ede21d676af8d879ec8f5d695255ccbf4398e76 (diff)
downloadAntennaPod-8f553f08f0347b73b34c80dddef228302cdf5977.zip
Add :ui:discovery module (#7037)
Diffstat (limited to 'ui/app-start-intent')
-rw-r--r--ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/OnlineFeedviewActivityStarter.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/OnlineFeedviewActivityStarter.java b/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/OnlineFeedviewActivityStarter.java
new file mode 100644
index 000000000..4299281f3
--- /dev/null
+++ b/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/OnlineFeedviewActivityStarter.java
@@ -0,0 +1,32 @@
+package de.danoeh.antennapod.ui.appstartintent;
+
+import android.content.Context;
+import android.content.Intent;
+
+public class OnlineFeedviewActivityStarter {
+ public static final String INTENT = "de.danoeh.antennapod.intents.ONLINE_FEEDVIEW";
+ public static final String ARG_FEEDURL = "arg.feedurl";
+ public static final String ARG_WAS_MANUAL_URL = "manual_url";
+ public static final String ARG_STARTED_FROM_SEARCH = "started_from_search";
+ private final Intent intent;
+
+ public OnlineFeedviewActivityStarter(Context context, String feedUrl) {
+ intent = new Intent(INTENT);
+ intent.setPackage(context.getPackageName());
+ intent.putExtra(ARG_FEEDURL, feedUrl);
+ }
+
+ public OnlineFeedviewActivityStarter withStartedFromSearch() {
+ intent.putExtra(ARG_STARTED_FROM_SEARCH, true);
+ return this;
+ }
+
+ public OnlineFeedviewActivityStarter withManualUrl() {
+ intent.putExtra(ARG_WAS_MANUAL_URL, true);
+ return this;
+ }
+
+ public Intent getIntent() {
+ return intent;
+ }
+}