我带有process_text意图的应用程序并未出现在所有应用中'复制菜单
我正在尝试扩展复制/粘贴菜单,以在我的应用中打开特定的活动。
问题是,我的应用程序出现在某些应用中,其中大多数应用程序都不出现。
AndroidManifest.xml:
<manifest ....>
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT" />
<data android:mimeType="text/plain" />
</intent>
<intent>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="text/plain" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:mimeType="text/plain"/>
</intent>
</queries>
<application ...>
<activity
android:name=".component.popupActivity.PopUpActivity"
android:exported="true"
android:theme="@style/Theme.Transparent.SemiBlack">
<intent-filter>
<action android:name="android.intent.action.PROCESS_TEXT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:mimeType="text/html"/>
<data android:mimeType="text/plain"/>
<data android:mimeType="application/xhtml+xml"/>
</intent-filter>
</activity>
</application>
</manifest>
我的实现有什么问题吗?
我已经使用WhatsApp,Instagram,Facebook,FB Messenger进行了测试。 仅与WhatsApp一起使用。
Translate , Outlook , Ideaseo购物, Firefox Focus 等其他应用程序。 总是能够将其应用程序添加到复制/糊菜单中。
Firefox Focus 是开源的,我没有注意到AndroidManifest.xml
I am trying to extend the copy/paste menu to open a specific activity in my app.
The problem is, that my app appears in some applications, and in most of them do not.
AndroidManifest.xml:
<manifest ....>
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT" />
<data android:mimeType="text/plain" />
</intent>
<intent>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="text/plain" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:mimeType="text/plain"/>
</intent>
</queries>
<application ...>
<activity
android:name=".component.popupActivity.PopUpActivity"
android:exported="true"
android:theme="@style/Theme.Transparent.SemiBlack">
<intent-filter>
<action android:name="android.intent.action.PROCESS_TEXT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:mimeType="text/html"/>
<data android:mimeType="text/plain"/>
<data android:mimeType="application/xhtml+xml"/>
</intent-filter>
</activity>
</application>
</manifest>
Is there anything wrong with my implementation?
I have tested it with WhatsApp, Instagram, Facebook, FB messenger.
Only works with Whatsapp.
Other apps like Translate, Outlook, idealo Shopping, Firefox Focus.
was always able to add their apps to the copy/paste menu.
Firefox Focus is open source, I did not notice anything different in AndroidManifest.xml
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
研究后,我发现以下内容:
必须将此意图过滤器添加到活动中。
我已经用 android 11 和 android 12 对其进行了测试。
androidmanifest.xml :
After researching, I found the following:
This intent-filter must be added to the activity.
I have tested it with Android 11 and Android 12.
AndroidManifest.xml:
确保
Process_Text
意图过滤器位于顶部。就我而言,我有两个意图过滤器,并将
Process_text
意图过滤器移至第一个位置是修复的。现在它出现在Chrome,Samsung浏览器和所有其他应用程序中。Make sure the
PROCESS_TEXT
intent filter is at the top.In my case I had two intent filters and moving the
PROCESS_TEXT
intent filter to the first position is what fixed it. Now it appears in Chrome, Samsung Browser and all other apps.