[F/OS] my Sharex extension V:3.0

CopyFile returns something, so use for example a
Set Label1.Text to CooyFile
to be able to receive what is returned

Asset
Test_Reve_1-14.kml
Shared
/Download/Test_Reve_1-14.kml

For the Send method use the full path, i.e./storage/emulated/0/Download/Test_Reve_1-14.kml
And the mime type for a kml file is application/vnd.google-earth.kml+xml

A very good way to learn App Inventor or Kodular is to read the free Inventor’s Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps … the links are at the bottom of the Web page. The book ‘teaches’ users how to program with AI2 blocks.

There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps

How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun

Hi,
having been squeezed during several weeks by other duties, I am just resuming my attempts to send a mail with a file attachment, leveraging the latest inputs received on this discussion stream from Taifun (thanks a lot again !). Unfortunately I am not yet done, still facing a situation where I receive an error message stating that my file is exposed beyond app through ClipData.Item.getURI(). Here are my blocks:


Everything works fine up to the block where .Copy File is called. The error appears with the very last block where SendMailWithFile is called.
Any hint to make this working will be appreciated. Thanks.
Best regards, Frederic.

The correct path is /Download/essai.txt
Taifun

Hi,

in the field « to File Name » of the Copy File block, I have replaced « /download/essai.txt » by « /Download/essai.txt » and in the field « File Path » of the FilePathToFile block I have replaced « /storage/emulated/0/download/essai.txt » by « /storage/emulated/0/Download/essai.txt » and also by « /Download/essai.txt ». In both cases, I am still receiving the same error as before. Is it due to the fact that I am using the Companion for testing, or is there any permission I missed to grant ?

Thanks again for your help.

Best regards, Frederic.

try additionally to set the to Scope in the Copy method to Legacy
Taifun

Hi,
specifying “Legacy” as “to Scope” does not help, but… I managed to get rid of my problem by removing the block “FilePathToFile” in the “SendMailWithFile” block. I do not understand why this FilePathToFile block was causing error, maybe you have an idea about that. Anyway Viel Dank for your help Taifun, really appreciated your dedication to contribute to the community.
Best regards, Frederic.

I wrote a little too fast… the mail is sent, but without the attachment. I continue to investigate.
Frédéric

You might want to provide a screenshot of your updated blocks
The file is now available in /Download?
Try another mail solution App Inventor Tutorials and Examples: Send Mail | Pura Vida Apps

Taifun

Hi again,
I have created a tiny project to highlight the problem I am facing. It contains two buttons and a label to create and then read a file (fichier_essai.txt), one button to copy from App to Shared scope in Download (where I have checked that the file has been properly copied), and a last button to (try to) send the file as a mail attachment.
The blocks are the followings:


If it helps, I can also send the .aia and .ais files for this tiny project, in case it helps resolving my problem.
Nochmals vielen Dank für Ihre Hilfe. Thanks again for your help.
Best regards, Frederic