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

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

问题描述

<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

推荐答案

为了做到这一点,你需要知道应用程序创建的意图和创建一个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.

意图和过滤器

应用程序可能使用,你可以钩到一个特定的操作名称。

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.

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

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