Summary
Selecting text in this app shows only the built-in actions. Apps that register
android.intent.action.PROCESS_TEXT — offline dictionaries, translators, search tools — never
appear in the selection toolbar, even when they are installed and working correctly.
Cause
Since Android 11 (targetSdk 30), package visibility filtering
applies to PackageManager.queryIntentActivities(). The text-selection toolbar is built inside the
app's own process, so an app that does not declare <queries> for PROCESS_TEXT receives an empty
result and renders no items.
Suggested fix
Add to AndroidManifest.xml:
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT" />
<data android:mimeType="text/plain" />
</intent>
</queries>
No code change, no new runtime permission, and no visible difference for users who have no such
apps installed.
How I verified this
On an Android device with 10 PROCESS_TEXT handlers installed:
cmd package query-activities -a android.intent.action.PROCESS_TEXT -t text/plain resolves all 10.
- Apps that declare the
<queries> block (Thunderbird, RedReader, Aves, Obtainium) show those
handlers in the selection toolbar.
- Apps that do not declare it, including this one, show none.
- Firing the intent explicitly with
am start -a android.intent.action.PROCESS_TEXT -t text/plain --es android.intent.extra.PROCESS_TEXT "word" -n <handler>
launches the handler correctly — so the handler side is fine, and only the caller-side
declaration is missing.
References
Summary
Selecting text in this app shows only the built-in actions. Apps that register
android.intent.action.PROCESS_TEXT— offline dictionaries, translators, search tools — neverappear in the selection toolbar, even when they are installed and working correctly.
Cause
Since Android 11 (targetSdk 30), package visibility filtering
applies to
PackageManager.queryIntentActivities(). The text-selection toolbar is built inside theapp's own process, so an app that does not declare
<queries>forPROCESS_TEXTreceives an emptyresult and renders no items.
Suggested fix
Add to
AndroidManifest.xml:No code change, no new runtime permission, and no visible difference for users who have no such
apps installed.
How I verified this
On an Android device with 10
PROCESS_TEXThandlers installed:cmd package query-activities -a android.intent.action.PROCESS_TEXT -t text/plainresolves all 10.<queries>block (Thunderbird, RedReader, Aves, Obtainium) show thosehandlers in the selection toolbar.
am start -a android.intent.action.PROCESS_TEXT -t text/plain --es android.intent.extra.PROCESS_TEXT "word" -n <handler>launches the handler correctly — so the handler side is fine, and only the caller-side
declaration is missing.
References