mirror of https://github.com/readrops/Readrops.git
Add intent filter to open AddFeedActivity with an url in direct share menus
This commit is contained in:
parent
cae41ad576
commit
d6d2b76213
|
@ -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">
|
||||
|
||||
<provider
|
||||
android:authorities="${applicationId}"
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
|
@ -34,19 +34,21 @@
|
|||
android:name=".activities.WebViewActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
<service android:name=".utils.feedscolors.FeedsColorsIntentService" />
|
||||
<service
|
||||
android:name=".utils.feedscolors.FeedsColorsIntentService" />
|
||||
|
||||
<activity android:name=".activities.SettingsActivity" />
|
||||
<activity
|
||||
android:name=".activities.SettingsActivity" />
|
||||
<activity
|
||||
android:name=".activities.SplashActivity"
|
||||
android:theme="@style/SplashTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".activities.AccountTypeListActivity" />
|
||||
<activity
|
||||
android:name=".activities.AccountTypeListActivity" />
|
||||
<activity
|
||||
android:name=".activities.AddAccountActivity"
|
||||
android:label="@string/add_account" />
|
||||
|
@ -66,7 +68,14 @@
|
|||
<activity
|
||||
android:name=".activities.AddFeedActivity"
|
||||
android:label="@string/add_feed_title"
|
||||
android:parentActivityName=".activities.MainActivity" />
|
||||
android:parentActivityName=".activities.MainActivity">
|
||||
<intent-filter android:label="@string/new_feed">
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="text/plain" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -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
|
||||
|
|
|
@ -110,5 +110,6 @@
|
|||
<string name="light">Clair</string>
|
||||
<string name="dark">Sombre</string>
|
||||
<string name="opml_export_description">Export des flux et dossiers</string>
|
||||
<string name="new_feed">Nouveau flux</string>
|
||||
|
||||
</resources>
|
|
@ -119,4 +119,5 @@
|
|||
<string name="light">Light</string>
|
||||
<string name="dark">Dark</string>
|
||||
<string name="opml_export_description">Export feeds and folders</string>
|
||||
<string name="new_feed">New feed</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue