Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix process-text intent filter. #191

Merged
merged 1 commit into from
May 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,28 @@
</activity>
<activity android:name=".main.dictionaries.search.RhymerRouterActivity"
android:theme="@android:style/Theme.NoDisplay"
android:label="@string/tab_rhymer"
android:exported="true">
<intent-filter android:icon="@drawable/ic_rhymer" android:label="@string/tab_rhymer">
<action android:name="android.intent.action.PROCESS_TEXT"/>
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<!--
Add this intent-filter as a workaround to make the PROCESS_TEXT
intent-filter work in Google apps (ex: chrome, keep, ...).
https://stackoverflow.com/a/72930519/1204440
Note: we only need to add it to one of the three activities, and
this will make PROCESS_TEXT work in all three.
-->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent-filter>
</activity>
<activity android:name=".main.dictionaries.search.ThesaurusRouterActivity"
android:theme="@android:style/Theme.NoDisplay"
android:label="@string/tab_thesaurus"
android:exported="true">
<intent-filter android:icon="@drawable/ic_thesaurus" android:label="@string/tab_thesaurus">
<action android:name="android.intent.action.PROCESS_TEXT"/>
Expand All @@ -116,6 +129,7 @@
</activity>
<activity android:name=".main.dictionaries.search.DictionaryRouterActivity"
android:theme="@android:style/Theme.NoDisplay"
android:label="@string/tab_dictionary"
android:exported="true">
<intent-filter android:icon="@drawable/ic_dictionary" android:label="@string/tab_dictionary">
<action android:name="android.intent.action.PROCESS_TEXT"/>
Expand Down