in our app, we want to appear in the "Share via" menu. So we added this intent-filter to our activity :
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/*" />
<data android:mimeType="audio/*" />
<data android:mimeType="image/*" />
<data android:mimeType="text/*" />
<data android:mimeType="video/*" />
</intent-filter>
It works and our app appears in the Share menu.
Nevertheless, the intent filter doesn't do exactly what we want to achieve :
- we want to appear in the menu for all files, whatever there mime type is
- we want to appear only for files. And up to now, if the user wants to share a simple text, as its mime type will be text/plain, our app appears in the menu and we don't want it.
What would the correct intent-filter be for all files and only for files ?
Thanks in advance.
We tried to add scheme=file and host="" or "*" and it doesn't work as many app use a scheme=content to share file based content.