How should I go about saving a Canvas to an Android 10+ internal storage? I have looked through the other threads and understand that I have to save the canvas to shared storage for it to appear in the Gallery.
However, when I attempt to do so, it seems to save the file to the App Specific Directory and will then not be visible in the Gallery. I have also tried to run the demo by Taifun and received the same result.
Ah yes - my App saves to Pictures, but when I checked, the image is saved to the ASD and then moved to Pictures using the TaifunFile extension - my bad. It also needs the TaifunTools "GalleryRefresh" function.
Hello! Thank you for the help! When I tried using this (whether with the AI Companion App or built as an apk), I realised there was some latency in that I had to close the app and refresh the gallery manually before the pictures appeared.
Would you have any idea what could be causing this and how I could go about eliminating this?
No worries Chris! Thanks for the help nonetheless, though I found that using TIMAI2's method seemed to work whilst my original code, even compiled as an apk didn't. Did my original code using taifun's tools manage to work for you?
This was not my experience. I added an imagePicker to my test app, and after saving and copying the canvas image, I was able to find the image using the imagepicker straight away. Could just be my file manager/s being more efficient on my device.
hello! my current final blocks would be as TIMAI2 pasted.
Not too sure why I couldn’t get the .GalleryRefresh to work for me as I attempted to adapt the solutions to the many existing threads that either you or taifun had given advice on
As I pointed out several times in the last years, the .RefreshGallery method doesn't work with a full path nor a relative path. You must use an absolute path.
@Taifun might want to explain the reason for this (after all these years and countless questions).
Gallery Refresh for a specific filename. Note : you will have to use an absolute path to the file, for example /storage/emulated/0/DCIM/myImage.jpg , Returns the filename.
Thank you for using the tools extension
That's the wrong question
The correct question is, why @chonker did not consider to read the documentation...
If you are tired to answer those questions, just don't do it
Hello! I’m fairly new to this hence I didn’t quite understand the documentation (tried to download and run the sample sia attached in the documentation but it didn’t quite work) hence I was asking for advice
Thank you for the reply though and everyone else for the help!
I don't think so, because I find it interesting to know the reason why it only works with an absolute path. AFAIK there is no path restriction in any other of your extensions.
This post is about saving a Canvas Image to the device's internal storage.
" Saving Canvas to Internal Storage" suggests saving to a database, e.g. ordinates and colours etc of geometry (which could therfore be re-drawn on reload of the App).