Hi  All.

I'm trying to send a zip file as mail attachment, in the ADP1 when
mail is composed it shows the zip file as attached but don't sends it.
This is the code I'm using:

                    // Setup the recipient in a String array
                    String[] mailto = {"supp...@mail.org"};
                    // Create a new Intent to send messages
                    Intent sendIntent = new Intent(Intent.ACTION_SEND);
                    // Add attributes to the intent
                    sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    sendIntent.putExtra(Intent.EXTRA_EMAIL, mailto);
                    sendIntent.putExtra(Intent.EXTRA_SUBJECT,"test");
                    sendIntent.putExtra(Intent.EXTRA_TEXT,"test");

                    sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new 
File
("file:///sdcard/test.zip")));
                    sendIntent.setType("application/zip");


                    
this.myContext.startActivity(Intent.createChooser(sendIntent,
"Email:"));

Cheers,

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to