The email is being received on by the recipient, but without the attachment. Here is the code, any expert knows where did I go wrong?
Intent messageIntent = new Intent(android.content.Intent.ACTION_SEND);
String aEmailList[] = { "mymailgmail.com" };
messageIntent.putExtra(android.content.Intent.EXTRA_EMAIL, aEmailList);
messageIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
...
messageIntent.setType("image/jpeg");
File downloadedPic = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), "MyApp.jpg");
messageIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(downloadedPic));
startActivity(Intent.createChooser(messageIntent, getResources().getString(R.string.chooser_pic)));
I get:
file:// attachment path must point to file://sdcard. Ignoring attachment file://...file name is MyApp.jpg
I am not getting image, only above text message. Thanks.