3
Ich versuche, eine E-Mail-Absicht mit einem beigefügten jpg zu starten.Wie startet man E-Mail-Absicht mit einem angehängten Bild?
ich getan habe:
Intent intent4 = new Intent(Intent.ACTION_SENDTO,
Uri.fromParts("mailto", "[email protected]", null));
startActivity(intent4);
dies startet die E-Mail-Aktivität.
Aber wenn ich versuche, DataAndType (meine JPEG-Anlage) hinzuzufügen. Es scheitert mit
android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.SENDTO data=file:///data/data/com.mycompany.mypackage/files/temp-picture type=JPEG
Intent intent4 = new Intent(Intent.ACTION_SENDTO,
Uri.fromParts("mailto", "[email protected]", null));
intent4.setDataAndType(Uri.parse("file://"+ mTempFilePath),
Bitmap.CompressFormat.JPEG.name());
startActivity(intent4);