I have the following configuration in the manifest file -
<activity
android:name=".activities.PopupWord"
android:excludeFromRecents="true"
android:theme="@style/popups">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PROCESS_TEXT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/*" />
</intent-filter>
</activity>
I can see my 'Lookup' Button in the text selection menu in apps like twitter in Android 10 but in Android 11 it vanished. Surprisingly it works in Chrome.
Wikipedia Beta, somehow circumvents this issue and shows its 'Search in Wikipedia' Button everywhere. I tried to see it's manifest and found it to be similar.
<activity
android:name="org.wikipedia.search.SearchActivity"
android:windowSoftInputMode="0x10">
<intent-filter
android:label="@ref/0x7f100190">
<action
android:name="android.intent.action.SEND" />
<category
android:name="android.intent.category.DEFAULT" />
<data
android:mimeType="text/plain" />
</intent-filter>
<intent-filter
android:label="@ref/0x7f100190">
<action
android:name="android.intent.action.PROCESS_TEXT" />
<category
android:name="android.intent.category.DEFAULT" />
<data
android:mimeType="text/plain" />
</intent-filter>
</activity>
(I have tried making mimeType text/plain and adding a label, it doesn't help)
Any leads will be helpful.