Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8545331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:46:03+00:00 2026-06-11T12:46:03+00:00

this may look as a duplicate, but I think I have tried most of

  • 0

this may look as a duplicate, but I think I have tried most of the solutions posted with no success.

I am writing an application that at some point sends files by email with a custom extension (.xyz)

I then need to open this files from the email app, and I cannot make it work.

After reading a lot of posts in this site and others, I came up with an intent filter that allows me to open this files from a File Explorer ( but not from the email app).

<intent-filter> 
                <action android:name="android.intent.action.VIEW" /> 
                <category android:name="android.intent.category.DEFAULT" /> 
                <category android:name="android.intent.category.BROWSABLE" /> 
                <data android:scheme="file" android:host="*" 
                    android:pathPattern=".*\\.xyz"/> 
 </intent-filter> 

I then tried to open the email and the attachment from within a web browser, and it didn’t work. (the file got downloaded, but then I couldn’t open it).
I got this error in the LogCat

    09-14 12:30:50.516: D/DownloadManager(2341): android.content.ActivityNotFoundException:
    No Activity found to handle Intent 
{ act=android.intent.action.VIEW 
dat=file:///mnt/sdcard/download/samplefile.xyz 
typ=message/rfc822 flg=0x10000000 }

Though I find it strange to use the rfc822 mime type for the file, I changed the intent filter and added

android:mimeType="message/rfc822"

to the data section.

Then I could open the file, just after being downloaded from the browser, but I can no longer open the file from a File Explorer (which makes kind of sense).

Even adding android:mimeType=”/” has the same effect. (The mime type of the file seen from within ASTRO File Explorer is empty).

But what I really need is to open the file from the email application, and none of these approaches helped there. I cannot even click on the attachment when opening the email.

I may need to create a custom mime type, but I have not been able to find how to do it.

So, the question is, what do I need to do to open the email attachments (from the builtin email app)with my application?

  • create a mime type? (if so, how?)
  • create a content provider?
  • both? (again, how?)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:46:04+00:00Added an answer on June 11, 2026 at 12:46 pm

    Just in case, someone has the same issue I had, I was able to finally make it work.
    The problem I had was that when sending the email with the attachment I was using the mime type “message/rfc822”. Changing it to “image/xyz” did the trick, and of course using the intent filter with mime type set to “*/*”.

    There’s a slgiht different behaviour when sending the email and is that you get a chooser with every app that can SEND, not only mail apps (MMS, WhatsApp, Bluetooth,…) , but in my case it is fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Firstly , This may look like a duplicate question but trust me I have
(At first glance this may look like a duplicate of Different execution plan when
This may be a stupid question but I have a code with the following
This may be have a better name than custom tab completion, but here's the
This may sound like a very generic question but here it goes. I have
This may look like a trivial problem. Sorry in that case, I am not
This question may look like a duplicate of: How to uninstall postgresql on my
I have 2 arrays in PHP that look something like this: $rows = array(11,12,14,14,11,13,12,11);
May be you think this is Duplicated, But This is not duplicated. change-hash-without-reload-in-jquery in
This may look a very basic question but I am having a problem accessing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.