E-mail aTTachment extension problem

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

E-mail aTTachment extension problem

Postby DeveloperAmit » Wed Mar 04, 2009 3:48 pm

i am trying to send an email with a sound attachment.
The sound file is in my resource directory(res/raw/)
I am able to send the mail along with attachment but when i download it from the mail...there is no extension to the attachment.
Anyone knows what went wrong in my code??

Uri fileuri = Uri.parse("android.resource://com.example.myapp/"
+R.raw.mysound);
Intent msg = new Intent(Intent.ACTION_SEND);
String[] recipients = {};
msg.putExtra(Intent.EXTRA_EMAIL, recipients);
msg.putExtra(Intent.EXTRA_TEXT, "Sending mail");
msg.putExtra(Intent.EXTRA_SUBJECT, "plz check attachment");
msg.putExtra(Intent.EXTRA_STREAM, fileuri);
msg.setType("audio/mp3");
startActivity(Intent.createChooser(msg, "Email Testing"));
DeveloperAmit
Junior Developer
Junior Developer
 
Posts: 20
Joined: Wed Mar 04, 2009 1:26 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 6 guests