Я пытаюсь запустить электронную почту с приложенным jpg.
Я сделал:
Intent intent4 = new Intent(Intent.ACTION_SENDTO,
Uri.fromParts("mailto", "testemail@gmail.com", null));
startActivity(intent4);
запускает электронную почту.
Но когда я пытаюсь добавить DataAndType (мое вложение jpeg). Не удается с
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", "testemail@gmail.com", null));
intent4.setDataAndType(Uri.parse("file://"+ mTempFilePath),
Bitmap.CompressFormat.JPEG.name());
startActivity(intent4);