Hello. I`m trying to improvemy ane and add multiple attachements to email.
This is my latest try: gist:1fcc08159e4cb724bbf2
Problem in this code:
if(filesPaths!=""){ String[] filesPathsArray = filesPaths.split(","); ArrayList<Uri> uris = new ArrayList<Uri>(); for (String filePath:filesPathsArray) { Uri uri = Uri.parse("file://" + filePath); uris.add(uri); } emailIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris); }
I have message "Couldn`t attach files".
But i know my array is correct. When i`m trying to add single file, it works ok:
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+ filesPathsArray [0]));
What i`m doing wrong? How to correct attach multiple files?
Clik here to view.
