Android :: How To Launch Android's Email Activity With An Attachment Attached?
Sep 20, 2010In my android, how can I launch android's compose email activity with an attachment attached?
View 1 RepliesIn my android, how can I launch android's compose email activity with an attachment attached?
View 1 RepliesI am trying to launch an email intent with an attached jpg. I did:
Intent intent4 = new Intent(Intent.ACTION_SENDTO,
Uri.fromParts("mailto", "testemail@gmail.com", null));
startActivity(intent4);
this launches the email activity.
But when I try to add DataAndType (my jpeg attachment). It fails with
android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.SENDTO data=file:///data/data/com.mycompany.mypackage/files/temp-picture type=JPEG
Intent intent4 = new Intent(Intent.ACTION_SENDTO,
Uri.fromParts("mailto", "testemail@gmail.com", null));
intent4.setDataAndType(Uri.parse("file://"+ mTempFilePath),
Bitmap.CompressFormat.JPEG.name());
startActivity(intent4);
how to create this screen which i have attached as a enclosed as a attachment. how to cod ethis can any body give the clues for that any source example regarding this.
View 7 Replies View RelatedOne of my 'must-haves' is the ability to open any kind of attachment that comes in with an email (.doc, .docx, .xls, .ppt, .jpeg, etc.) I was assured the Ally could with the application docs-to-go. I am now finding that it's a hit and miss with opening files. Files that have the .doc extension will come up and say 'can't open this video'.
View 1 Replies View RelatedI'm trying to get the name of the file attached to an email on the gmail app? Can anyone point in the direction of getting the file name ? I can get the attachemnt, just don't know how to get the original file name.
View 1 Replies View RelatedI have created an app that sends an email with a recording, When the intent is fired and email is chosen as the app to send the attachment, you can see that there is an attachement but the attachment is not delivered. code...
View 1 Replies View RelatedI have the Samsung Captivate and I'm totally new. I'm having problems opening my email attachments (pdf and xls). I found this thread, but I'm still confused. I can't seem to find "open unknown apps" nor "Unknown Sources" in my Settings.
View 5 Replies View RelatedI want to open a specific type of file that my app can already send over email as an attachment. I need to be able to have the android email app choose my app to download or open that specific file type. I can't figure out how to set up an intent filter that would let me do that though. Anyone know how this is done?
View 1 Replies View RelatedI never got this to work on a real device, got the email but no attachment, also when installing K9 on a emulator and then sending the email I see the mail in the outbox with a size of 0 bytes:
public static void sendFile(Context context) { File exportDir = new File(Environment.getExternalStorageDirectory(), "mydir"); if (!exportDir.exists()) { exportDir.mkdirs(); } String csvFile = exportDir + "/file.csv"; File file = new File(csvFile); if(file.exists()) { Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_SUBJECT, "CSV file"); sendIntent.setType("text/csv"); //sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); //sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + Environment.getExternalStorageDirectory() + "/mydir/file.csv")); sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/ mydir/file.csv")); context.startActivity(Intent.createChooser(sendIntent, "Send CSV file")); } else { Util.displayToast(context, R.string.no_csv_file); } }
I am trying to send an email using native email client on android phone. I have tried following ways to add an attachment to the mail.
Method 1 Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.setType("image/jpeg"); sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://sdcard/ abc.jpg"));
Method 2
Sending the image as body content
sendIntent.putExtra(Intent.EXTRA_TEXT, "<HTML><BODY><b><IMG SRC= "data:image/jpeg;base64," + <imagepath> + ""alt = "pleaseview this image"/></b></BODY></HTML>");
I can successfully attach the image manually but when I tried to attach and send it programmatically the mail was sent without attachment.
how to send a zip file as an attachment of an email?
Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_EMAIL, mailto); sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Sample"); sendIntent.setType("application/zip"); sendIntent.putExtra(Intent.EXTRA_STREAM,pathtozipfile);
startActivity(Intent.createChooser(sendIntent,"send the mail"));
I tried about snippet.But didnt work. Anybody tried sending zip file attachments?
I'm creating an app that has an "export" feature which converts the user's data into a CSV file, and allows the user to send it as an attachment to somebody (presumably themselves).
The CSV file is created successfully, but when I try to send the email, I encounter a problem. The device looks like it is going to send the email with the appropriate attachment, but when the email is received... there is no attachment at all...
Here is the code I am using to send the email:
CODE:................
I have built a test android app and signed it successfully and then sent it to someone to test via email. They click on the attachment in the email on their android phone and get a parsing error.
View 2 Replies View RelatedMy app is comprised of a set of reusable Activities that other apps can reuse. For various reasons, I would like my Activities to be launched in context of the invoking Activity's process, instead of always being launched in my Activity's process (default behavior on Android). How can I achieve this?
View 1 Replies View RelatedI just copy the code from http://www.openintents.org/en/node/121 to test if I can send .txt or .mp3 file as email attachment, Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.setType("audio/mp3"); sendIntent.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/mysong.mp3"); sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Subject"); startActivity(Intent.createChooser(sendIntent, "Title:"));
But I got an error said that No applications can perform this action. My android sdk is cupcake1.5, and I have already set up my gmail acount in Email application. Anyone knows why? If I set the type as "*/*"(sendIntent.setType("*/ *");), it can launch the Email activity but with no attachment.
I wanted to know what is the maximum size of the file that we can attach with email in android? Or is the attachment limit completely dependent on E-mail that we have configured?
View 1 Replies View RelatedIn my android project, I have 2 Activities. How can I launch an Activity from an Activity. I know I can do 'startActivity', but my activity has NOT registered for any Intent, is there anyway I can still launch it from my activity?
View 1 Replies View RelatedHow do you view an attached spreadsheet in an email? I only have OpenOffice.org Calc to try and figure it out, but when I receive the email, it won't let me "click" on the attachment to recognize it/open it. I downloaded Documents to Go (menu doesn't llist any email program to open) and Spread Sheet Lite (can't "find" the file) but don't know how to find the email/open the attachment.
View 2 Replies View RelatedHad the phone now two weeks. Got the upgrade to 2.2 from sprint succesfully. Enjoying the power of this machine for sure. I lurk here a lot and have learned tons for sure from reading, reading, reading sometimes till the wee hours. Three things I still can't seem to figure out. 1. Opening an attachment in an email: When a pic or doc file comes in I can't seem to view it. I click "view attachment" it shows the name of the file and the size but does not open the file or download it for me to see. What am I doing wrong? Some kind of settings issue maybe? 2. Deleting a file: I downloaded a pdf file off the internet and now I wish to delete it. Menu does not show an option to delete when I am viewing thde file with pdf viewer. Any ideas? 3. Voice email: I love the voice texting, voice emailing, etc but when I open an email to compose new and use the speak option to speak the name of a current contact (who has an email as part of his contact info) it does not try to auto fill that like it would if I hand texted it in. In other words, say I begin a new email and in the TO box I click the microphone and speak john smith. It types his name in but does not recognize him from contacts and fill in his email address like it does if I start to type j o h n s m by hand. I must be doing something wrong here too maybe?
View 4 Replies View RelatedDo you think it will come a time when we can view e-mail pictures that are embedded in the e-mail? Hate when I get a forward and can't view the pictures. Am I missing something? It seems only when people officially attach the file is when I can see it. Other than that..I get the blue box with a "?" in the middle.
View 3 Replies View RelatedI received an email in my Gmail acct with a pdf attachment, and I want to download it. I can preview the file but I see no option to save it to my SD card or Dropbox or anything. Any tips on saving a pdf on the DINC?
View 5 Replies View RelatedI receive MP4 attachments from my Linksys G54 camera but Droid plays the file on rare occasions. Sometimes it plays and other times it will not play even the same file.
View 3 Replies View RelatedI am using the OEM Android email app. Attacing a picture is no problem. If I try and attach say a video of 5 plus mb it won't attach. I get an error message telling me file is too large to attach.
(I have a ZTE Blade running Android 2.3.7 on a Cyanogenmod ROM 7.10.)
I have two questions.
- what is the maximum permisable file size for attachments;
- can the file size limit be increased in anyway?
I cannot send an email with an attachment using the Gmail app on this phone. I tried to send three different photographs to three different email addresses and it failed every time. Emails without attachments go perfectly every time.
View 6 Replies View Relatedwhat the maximum file size is I can attach to an outgoing email using Gmail? I know Gmail allows 20 megabytes, but is there a size limit I can attach from the Hero? I have had the phone tell me a file is too big to attach, but it was well under 20 megs.
View 4 Replies View RelatedI have 2 projects (each has its own apk). Can you please tell me how can I launch an activity which is in another apk that I created? I have this activity which I want to launch from another project: what should I put in here so that I can launch this from another activity in another project?
View 1 Replies View RelatedIs it in any way possible to launch an activity from the main function without having a UI? i.e. is there a way to create a sort of "wrapper" around another activity, i.e. by launching the main activity, it takes you to another activity automatically. If that is not possible, is there a way to remove the main activity from the stack so that clicking the back button does not take you to a blank UI?
Here's an example of what I'm trying to do:
public class WrapperActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:555-1212"));
startActivity(intent);
}
}
After installing BBeast I can't open the attachment on my Email..
Anyone know how to fix this?
For example, typing "321" launches my application.
View 9 Replies View RelatedHow can I launch an android activity, defined with.* public class MyActivity extends Activity {...}.from a Java method ?
View 6 Replies View Related