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.
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.
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 ?
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.
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