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:allowBackup="true"
|
||||||
android:icon="@drawable/ic_readrops"
|
android:icon="@drawable/ic_readrops"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
android:requestLegacyExternalStorage="true"
|
||||||
android:roundIcon="@drawable/ic_readrops"
|
android:roundIcon="@drawable/ic_readrops"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
android:requestLegacyExternalStorage="true"
|
|
||||||
tools:ignore="AllowBackup,GoogleAppIndexingWarning,UnusedAttribute">
|
tools:ignore="AllowBackup,GoogleAppIndexingWarning,UnusedAttribute">
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:authorities="${applicationId}"
|
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
android:authorities="${applicationId}"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:grantUriPermissions="true">
|
android:grantUriPermissions="true">
|
||||||
<meta-data
|
<meta-data
|
||||||
@ -34,19 +34,21 @@
|
|||||||
android:name=".activities.WebViewActivity"
|
android:name=".activities.WebViewActivity"
|
||||||
android:theme="@style/AppTheme.NoActionBar" />
|
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
|
<activity
|
||||||
android:name=".activities.SplashActivity"
|
android:name=".activities.SplashActivity"
|
||||||
android:theme="@style/SplashTheme">
|
android:theme="@style/SplashTheme">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name=".activities.AccountTypeListActivity" />
|
<activity
|
||||||
|
android:name=".activities.AccountTypeListActivity" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.AddAccountActivity"
|
android:name=".activities.AddAccountActivity"
|
||||||
android:label="@string/add_account" />
|
android:label="@string/add_account" />
|
||||||
@ -66,7 +68,14 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".activities.AddFeedActivity"
|
android:name=".activities.AddFeedActivity"
|
||||||
android:label="@string/add_feed_title"
|
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>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
@ -132,6 +132,13 @@ public class AddFeedActivity extends AppCompatActivity implements View.OnClickLi
|
|||||||
});
|
});
|
||||||
|
|
||||||
feedsToUpdate = new ArrayList<>();
|
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
|
@Override
|
||||||
|
@ -110,5 +110,6 @@
|
|||||||
<string name="light">Clair</string>
|
<string name="light">Clair</string>
|
||||||
<string name="dark">Sombre</string>
|
<string name="dark">Sombre</string>
|
||||||
<string name="opml_export_description">Export des flux et dossiers</string>
|
<string name="opml_export_description">Export des flux et dossiers</string>
|
||||||
|
<string name="new_feed">Nouveau flux</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -119,4 +119,5 @@
|
|||||||
<string name="light">Light</string>
|
<string name="light">Light</string>
|
||||||
<string name="dark">Dark</string>
|
<string name="dark">Dark</string>
|
||||||
<string name="opml_export_description">Export feeds and folders</string>
|
<string name="opml_export_description">Export feeds and folders</string>
|
||||||
|
<string name="new_feed">New feed</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user