Here you have the blocks to save an image with Canvas
and display it in the Gallery on all Android versions.
Note: This is currently not possible with the
File
component due to its known bug regarding storage permissions on Android 11+. So we have to use one ofFile
extensions from @Taifun or @vknow360.
To check this on different devices & Android version: canvasGallery.apk - Google Drive
How does it work:
- Check the API level and if < 30, request
WRITE
permission.- Save the canvas image in the ASD (→
DefaultFileScope = App
)- Move the image from the ASD to
/Pictures
(Shared folder) using TaifunFile.- Display the image with the
Image
component.- Refresh Gallery using TaifunTools ext.
- When the app is closed, the image will be deleted (reason: see note in blocks).
On Android 11+ it should work without any storage permissions.