Sending email with attachment using intent.

All your problems with Audio, Video and Images.

Sending email with attachment using intent.

Postby Jhon » Fri Feb 05, 2010 11:33 am

Intent sendIntent = new Intent(Intent.ACTION_SEND);
// Add attributes to the intent
sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
sendIntent.putExtra(Intent.EXTRA_SUBJECT,"subject line");
sendIntent.putExtra(Intent.EXTRA_TEXT,"Body of email");
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File("Filename")));
sendIntent.setType("vnd.android.cursor.dir/email");

startActivity(Intent.createChooser(sendIntent,"Email:"));
Happy Journey
Jhon
Jhon
Freshman
Freshman
 
Posts: 9
Joined: Wed Sep 09, 2009 4:06 pm

Top

Postby icobasco » Sat Feb 06, 2010 3:50 pm

I didn't catch which is the problem.... :) Perhaps did you want to put it in the tutorial category?
User avatar
icobasco
Senior Developer
Senior Developer
 
Posts: 108
Joined: Thu Jun 04, 2009 11:12 am
Location: Italy

Postby Jhon » Wed Feb 10, 2010 7:14 am

Hi
There is no problem in that code.
just i keep it for reference ..
Now i shift this code to tutorials..
Happy Journey
Jhon
Jhon
Freshman
Freshman
 
Posts: 9
Joined: Wed Sep 09, 2009 4:06 pm

Postby icobasco » Wed Feb 10, 2010 8:56 am

Ok thankx for sharing, but before to do it take a look cause there was an older tutorial from plusminus about the same topic.
User avatar
icobasco
Senior Developer
Senior Developer
 
Posts: 108
Joined: Thu Jun 04, 2009 11:12 am
Location: Italy

Postby Jhon » Wed Feb 10, 2010 9:32 am

ok
Happy Journey
Jhon
Jhon
Freshman
Freshman
 
Posts: 9
Joined: Wed Sep 09, 2009 4:06 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 9 guests