

In order to register on intents from gmail, we need to support content scheme: Since this is one of top question at google related to "gmail attachment intent filter" and I found above answer not working in my case I post the result of my research. ext files are sent as attachments to the regular email client as well.

In fact, this will also cause your app to open when. This intent will cause gmail to display the Download / Preview buttons. Unfortunately, the only schemes I know of are http https content and file, and none of the above are the magic bullet. But I believe it has to do with selecting the correct scheme. I hope someone else can build off my trials. After discovering the above, I tried the obvious - use a " * " for the scheme, and even tried ". However, as per the Android documentation, "If a scheme is not specified for the intent filter, all the other URI attributes are ignored." With the scheme and URI attributes removed, the only other way to filter the intents is using Mime type, and we all know that custom file extensions do not have registered mime types. I was able to make the download and preview buttons pop up on Android in GMail by removing the scheme data filter in my intent (delete the scheme line and give it a try):
