如何让我的 Android 应用出现在另一个特定应用的共享列表中 [英] How to make my Android app appear in the share list of another specific app

查看:16
本文介绍了如何让我的 Android 应用出现在另一个特定应用的共享列表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<action android:name="android.intent.action.SEND" />     
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />

这是在我的清单文件中

这将使我的应用出现在所有应用的共享列表中但我希望我的应用程序出现在另一个特定应用程序的共享列表中我没有其他应用程序

this will make my app appear on the share list of all apps but I want my app to appear in the share list of another specific app and I don't own the other app

推荐答案

为了做到这一点,您需要知道应用程序正在创建的 Intent 并创建一个 IntentFilter,它将您的应用程序添加到特定列表中.

In order to do this, you need to know the Intent that the application is creating and create an IntentFilter that will add your application to the specific list.

>

接收隐式意图 关于意图和过滤器(Android 开发者)

应用程序可能使用您可以挂钩的特定操作名称.

The application probably uses a specific action name that you could hook to.

<intent-filter . . . >
    <action android:name="com.example.project.SHOW_CURRENT" />
    <action android:name="com.example.project.SHOW_RECENT" />
    <action android:name="com.example.project.SHOW_PENDING" />
    . . .
</intent-filter>

或者它可能正在寻找接受某种类型文件的应用程序.

Or it could be looking for applications accepting a certain type of file.

<intent-filter . . . >
    <data android:mimeType="video/mpeg" android:scheme="http" . . . /> 
    <data android:mimeType="audio/mpeg" android:scheme="http" . . . />
    . . .
</intent-filter>

应用程序的名称及其共享的内容将有助于我给出更具体的响应.

The name of the application and what it is sharing would help me give a more specific response.

这篇关于如何让我的 Android 应用出现在另一个特定应用的共享列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆