From d6d2b76213b38bcee93df212e75c2ffe0dc4289c Mon Sep 17 00:00:00 2001 From: Shinokuni Date: Mon, 23 Dec 2019 13:44:02 +0100 Subject: [PATCH] Add intent filter to open AddFeedActivity with an url in direct share menus --- app/src/main/AndroidManifest.xml | 23 +++++++++++++------ .../app/activities/AddFeedActivity.java | 7 ++++++ app/src/main/res/values-fr-rFR/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 0bd9268e..1083bba1 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -13,16 +13,16 @@ android:allowBackup="true" android:icon="@drawable/ic_readrops" android:label="@string/app_name" + android:requestLegacyExternalStorage="true" android:roundIcon="@drawable/ic_readrops" android:supportsRtl="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true" - android:requestLegacyExternalStorage="true" tools:ignore="AllowBackup,GoogleAppIndexingWarning,UnusedAttribute"> - + - + - - + @@ -66,7 +68,14 @@ + android:parentActivityName=".activities.MainActivity"> + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/readrops/app/activities/AddFeedActivity.java b/app/src/main/java/com/readrops/app/activities/AddFeedActivity.java index 1ff9fb4d..6323f6cf 100644 --- a/app/src/main/java/com/readrops/app/activities/AddFeedActivity.java +++ b/app/src/main/java/com/readrops/app/activities/AddFeedActivity.java @@ -132,6 +132,13 @@ public class AddFeedActivity extends AppCompatActivity implements View.OnClickLi }); feedsToUpdate = new ArrayList<>(); + + // new feed intent + if (getIntent().getAction().equals(Intent.ACTION_SEND)) { + String text = getIntent().getStringExtra(Intent.EXTRA_TEXT); + binding.addFeedTextInput.setText(text); + onClick(binding.addFeedLoad); + } } @Override diff --git a/app/src/main/res/values-fr-rFR/strings.xml b/app/src/main/res/values-fr-rFR/strings.xml index 59c75598..20fd4809 100644 --- a/app/src/main/res/values-fr-rFR/strings.xml +++ b/app/src/main/res/values-fr-rFR/strings.xml @@ -110,5 +110,6 @@ Clair Sombre Export des flux et dossiers + Nouveau flux \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3d473314..be549d8a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -119,4 +119,5 @@ Light Dark Export feeds and folders + New feed