I am experiecing "This action is not currrently supported" error condition when execute the following code snippet in Android 2.1. What is wrong with the snippet?
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_SENDTO);
Uri uri = Uri.parse("mailto:myemail@gmail.com");
intent.setData(uri);
intent.putExtra("subject", "my subject");
intent.putExtra("body", "my message");
startActivity(intent);
}
You Can Try This One
It Works For me
Actually I found a way where the EXTRAs work. This is a combination of an answer I found here regarding ACTION_SENDTO
http://www.coderanch.com/t/520651/Android/Mobile/no-application-perform-action-when
and something for HTML which I found here:
How to send HTML email (but the variant of how to use ACTION_SENDTO in this HTML post didn't work for me - I got the "action not supported" which you are seeing)
If you use
ACTION_SENDTO
,putExtra()
does not work to add subject and text to the intent. UsesetData()
and theUri
tool add subject and text.This example works for me: