Hi,
My application is able to launch ACTION_SEND_TO with the following code:
Intent intent4 = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
"mailto",
"[email protected]", null));
startActivity(intent4);
But when try to attach JPEG file with the Intent
Intent intent4 = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
"mailto",
"[email protected]", null));
String mimeType = Bitmap.CompressFormat.JPEG.name();
intent4.setType(mimeType);
System.out.println (" mTempFile" + mTempFile);
intent4.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+ mTempFile));
I have checked the file at "file://"+ mTempFile does exist.
But I get this exception:
Caused by: android.content.ActivityNotFoundException: No Activity
found to handle Intent { action=android.intent.action.SENDTO type=JPEG
(has extras) }
E/AndroidRuntime( 1806): at
android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1484)
E/AndroidRuntime( 1806): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:1454)
E/AndroidRuntime( 1806): at
android.app.Activity.startActivityForResult(Activity.java:2656)
E/AndroidRuntime( 1806): at
android.app.Activity.startActivity(Activity.java:2700)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---