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 3999528
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:40:08+00:00 2026-05-20T07:40:08+00:00

I am trying to add emailing capabilities to my Android application. What I am

  • 0

I am trying to add emailing capabilities to my Android application. What I am trying to do actually is send a file that contains a json string representing some application data by using the ACTION_SEND intent. The problem is that on my device, an HTC Desire with Froyo, Gmail sends the actual email, but not the attachment, even though I see the attachment when the Gmail app starts as attached. However, on the emulator, using the default email application, this works just fine. This also works if I am using an application such as ASTRO file manager to send the attachment directly from the SD card with it’s default suggested mime type.
Anyone encountered something similar?
My code looks something like this:

Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.setType("application/sal");
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "shopping list");
Log.d(TAG, "attachment file: " + Uri.parse("file:/" + fileWithPath));
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:/" + fileWithPath));

I have tried a variety of mime types also, such as application/json or text/plain with same result.

  • 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-05-20T07:40:08+00:00Added an answer on May 20, 2026 at 7:40 am

    Apparently, there is some issue with the URI’s starting with file:// on Gmail for Android, so I found some recommendations regarding how to handle attachments and files which said that a content provider internal for the application, to access the file content should be used. Examples for implementing something like that can be found in OI FileManager here and here. I have looked over the source code a fore mentioned and tried implementing my own content provider to access the file I want to attach, and it worked.
    I hope this information is helpful for others that may try this.

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

Sidebar

Related Questions

I'm trying add some implicit rules in CMake that will generate direct dependencies (like
I'm trying add a tab to my web page that looks like this: Using
trying to add an ExpiresDefault ExpiresByType to content on my website so that way
I am trying to add some custom build steps to my headless build process
I'm trying add Taskbar Icon overlay with text to windows7 application icon, I did
I'm trying add a bold/strong tag the line headings of the follow string/text block:
I'm trying add vertical lines to my grid. I have found some examples but
I'm trying to add a very simple file input to my webapp which I'm
I'm trying to write test harness for part of my Android mapping application. I
Trying to add an onclick handler to my tabs, and can't seem to get

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.