Skip to content

Commit a360e40

Browse files
authored
Merge pull request #191 from caarmen/fix-process-text
Fix process-text intent filter.
2 parents 80879a8 + 93e5283 commit a360e40

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: app/src/main/AndroidManifest.xml

+14
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,28 @@
9898
</activity>
9999
<activity android:name=".main.dictionaries.search.RhymerRouterActivity"
100100
android:theme="@android:style/Theme.NoDisplay"
101+
android:label="@string/tab_rhymer"
101102
android:exported="true">
102103
<intent-filter android:icon="@drawable/ic_rhymer" android:label="@string/tab_rhymer">
103104
<action android:name="android.intent.action.PROCESS_TEXT"/>
104105
<category android:name="android.intent.category.DEFAULT" />
105106
<data android:mimeType="text/plain" />
106107
</intent-filter>
108+
<!--
109+
Add this intent-filter as a workaround to make the PROCESS_TEXT
110+
intent-filter work in Google apps (ex: chrome, keep, ...).
111+
https://stackoverflow.com/a/72930519/1204440
112+
Note: we only need to add it to one of the three activities, and
113+
this will make PROCESS_TEXT work in all three.
114+
-->
115+
<intent-filter>
116+
<action android:name="android.intent.action.VIEW" />
117+
<data android:scheme="https" />
118+
</intent-filter>
107119
</activity>
108120
<activity android:name=".main.dictionaries.search.ThesaurusRouterActivity"
109121
android:theme="@android:style/Theme.NoDisplay"
122+
android:label="@string/tab_thesaurus"
110123
android:exported="true">
111124
<intent-filter android:icon="@drawable/ic_thesaurus" android:label="@string/tab_thesaurus">
112125
<action android:name="android.intent.action.PROCESS_TEXT"/>
@@ -116,6 +129,7 @@
116129
</activity>
117130
<activity android:name=".main.dictionaries.search.DictionaryRouterActivity"
118131
android:theme="@android:style/Theme.NoDisplay"
132+
android:label="@string/tab_dictionary"
119133
android:exported="true">
120134
<intent-filter android:icon="@drawable/ic_dictionary" android:label="@string/tab_dictionary">
121135
<action android:name="android.intent.action.PROCESS_TEXT"/>

0 commit comments

Comments
 (0)