I 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.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---