Hello, I am trying to save my a canvas I've created in MIT App Inventor straight to the gallery on my Android phone. I understand there is some kind of bug at the moment which prevents this and I have seen similar problems on the forum but I am still unsure how to go about successfully implementing these solutions for the case of the save canvas function. These are are the blocks I currently have implemented in the program to save the canvas:
and this is the error I get:
Illegal character in path at index 81: file:///storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/My Documents/Pictures/app_inventor_1634978166849.png Note: You will not see another error reported for 5 seconds.
The problem arises due to the space in your given file directory (My Documents).
Save it in another directory that doesn't contain a space.
Also, please make sure to search the Community before you post a topic; this bug has been discussed numerous times already:
I see. Does that mean it is no longer possible to save the documents to the gallery at all? I have been a long time iphone user and am unfamiliar with how file directories work on android devices I think that is a maybe main cause for my confusion....
Is there an easily accessible directory I can save it to? And how do I go about implementing that in App Inventor.
Thanks for the reply! I tried this and although the App gave no errors and seemingly saved the file to the storage location the image was nowhere to be found under the given directory. Searching the phone for the image name also revealed no results
At this point I am really unsure of what I could do to try and get this image saving to work and it seems that AppInventor just doesn't allow for this functionality in any accessible way. But if anyone has any further ideas or ways to get this working please let me know!
Here is my aia. I tried using the full filename as specified by @TIMAI2 but then in this version just used the filename "/mycanvas.jpg". I think this version is correct but maybe I am wrong.
I really appreciate the help and support given with regards to my problem. You guys and girls are heroes
Is there any chance you could share the .aia file for this app that I could upload to my phone as a .apk? If not I am sure I can get this app on my phone but it would be easier through the .aia
When using this app it appears to save the image but then when I folder dive on the android through storage/emulated/0/android/data/ I do not see the folder which I believe should have been created by the app. Once again doing a deep search of the phone the saved image / file does not come up...
Is this a problem with how I am diving through the android directories? At the end of the day I would also like the files to be saved in an accessible folder for the more novice user
The ASD is no longer visible on Android 11+ devices. Connect you device via USB with your computer and you will see it. Or use a file manager app (e.g. Total Commander) to get access to the ASD. Search the forum, there are a lot of topics on this ...
If that is the case I think I will not try and implement this functionality within my app as it just seems to cumbersome, but thank you so much for the help and I feel satisfied knowing that I really tried to get it to work