It seems I was pursuing ever more complex solutions when the problem was elsewhere - what you have sent works perfectly to generate the output.
The problem appears to be with my phone (Samsung S7E, Android 8) in that it will not actually send the attachments in native email, Gmail, Dropbox or Google Drive. WhatsApp is the only one of the available apps tried so far on my phone which does actually export.
When set up as you advised your extension DOES generate the required multiple attachments.
However, none of the apps on my phone that I listed actually deliver the attachments. For example, on the email app I get the message "Unable to attach file". The other apps don't give an error message.
WhatsApp works OK.
The SharingTools.ShareFile works OK in email with a single file.
Okay i got it, for the SendMultipleFile function it can only send lots of files well on whatsapp and still not working properly in other apps, that's because there are probably two factors,
the first factor is because other apps still can't accept multiple files
and the second factor is because the code for sending multiple files to another app is different, but in my opinion the problem is not due to the second factor but the problem is in the first factor, because the code I use is very neutral and special so I'm not sure if my code is wrong.
And if I have time, I'll update my extensions when I find code that works more perfectly.
Please don't misunderstand - I was not suggesting any fault within your extension. Whilst WhatsApp is not ideal I'm very glad to have some method for exporting multiple attachments and am sure the problem lies within my phone, its apps or the Android version. That may become clearer from any feedback from other users.
Look forward to any developments you come up with. I'm happy to test if that would assist.
Having also tried sharing via native email, Gmail, GoogleDrive, Dropbox they either throw an error message or silently fail to deliver the attachments.
The SharingTools.ShareFile (single item) works OK with these various apps.
Have you tried sending multiple files other than just that one?
I see the path that you add is just like this : /storage/emulated/0/foto.jpg
Are you sure your photo is on that path?
I think your photos should be in a separate folder for example: /storage/emulated/0/Pictures/foto.jpg
I am sure my code is not wrong because the code I use is very secure,
if you want to see I will show you
And I just want to say that I will keep updating this extension because I also have the latest ideas so I probably will add a new function that is very useful so you don't have to worry about all of my extensions I will keep updating, if i have time.