Problem with saving a Canvas image and show it in Gallery on all Android version

These are the blocks that I did, but the result gives an error as in the picture


ask for permission in the Screen.Initialize event
which Android version are you using for your tests?
before testing tha apk, you have to delete the image /Pictures/canvas.png manually to be able to store it
the first GalleryRefresh block does not make sense and can be removed therefore

it would help to see the complete error message...
use the Screen.ErrorOccurred event and display the error message in a label

btw. you also could simplify like this

Taifun

I implemented the blocks as stated in this post but it did not work either
How to save a Canvas image and show it in Gallery on all Android version


THE SAME PROBLEM

THE SAME PROBLEM

ANDROID 13


SHOWING NOTHING ERROR !!!

It should work on all Android versions ≥ 11 with Companion & the APK. But if "canvas1.jpg" is first saved (created) with Companion it won't work with the APK, because the file was created by another app (Companion) and can't be overwritten by another app (APK version) and vice versa. So delete the image beforehand and / or rename it.


Post a screenshot of the error (problem).

AFTER RENAME IMAGE


I Cant read the full message

This message doesn't come from the TaifunFile extension or Canvas component). So which other extensions and/or components do you use? Post all relevant blocks and the aia or a simple test aia.

sketch.aia (245.1 KB)

Works fine (on Android 13, Companion).

When exactly does this message occur?

Move to file path should be:

/storage/emulated/0/Pictures/canvas.jpg

?

TaifunFile extension works with the

  • relative
  • absolute and
  • full path.

image

I exported the apk file to the phone , the error message disapeard , and it seems that the error message in the companion only , and I create a name counter , but i found only the first image in the gallery , no extra image saved

No it works with Companion as well, but you must keep this in mind:

version?

grafik

ok up to now

All problems have been resolved except that saved images appear in the pictures folder (path ) but do not appear in the gallery

Just use the Gallery Refresh method then
Taifun