in our app, we want to appear in the \"Share via\" menu. So we added this intent-filter to our activity :
we want to appear in the menu for all files, whatever there mime type is
Try a MIME type of */*
.
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. 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.
Then have two <data>
elements, one for a scheme of content
and one for a scheme of file
.
<data android:mimeType="*/*" />
<data android:scheme="content" />
<data android:scheme="file" />
However, bear in mind that a content
scheme does not mean that it is necessarily a file.
scheme="file"
is the answer to run only on files. Now if the 3rd party applicaiton pass the data as content
, then it is (by defiinition) not a file any more