爲了做到這一點,您需要知道應用程序正在創建的Intent,並創建一個IntentFilter來將您的應用程序添加到特定列表中。
Receiving an Implicit Intent上Intents and Filters (Android Developers)
應用程序可能使用,你可以鉤到一個特定的動作名稱。
<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>
或者它可能正在尋找應用程序接受某種類型的文件。
<intent-filter . . . >
<data android:mimeType="video/mpeg" android:scheme="http" . . . />
<data android:mimeType="audio/mpeg" android:scheme="http" . . . />
. . .
</intent-filter>
應用程序的名稱和它共享的內容將幫助我給出更具體的響應。
我希望我的應用僅出現在「Google Play應用」的共享列表中。當你嘗試分享應用程序。它共享文本,但很多其他應用程序使用相同的東西! 我可以過濾文本的內容?? !! –
我不認爲這是可能的。檢查意圖顯示它確實非常普遍。 – DanO