如何使我的Andr​​oid应用程序出现的另一个特定的应用程序共享列表中应用程序、使我、列表中、oid

2023-09-12 07:54:33 作者:″莪的爱,你伤不起-

<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.