yes, these permissions never existed and WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE do not exist anymore for devices Android 11+
Taifun
yes, these permissions never existed and WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE do not exist anymore for devices Android 11+
Taifun
A small correction: WRITE_EXTERNAL_STORAGE
does no longer exist on Android 11+ and READ_EXTERNAL_STORAGE
does no longer exist on Android 13+.
[quote=“ForRob, post:1, topic:247026”]
And this is the blocks to delete the file :
The File component uses a relative path.
This is the file I want to delete:
You cannot delete a file in the root dir of the external storage on Android 11+ (without all-file-permission, which is not allowed by Google in the Play Store).
Ok so how to store the edited pictures on a specific folder and then delete it ?
how to store the edited pictures on a specific folder
Now we are again at rhe beginning of this thread
let me suggest you to store the image in ASD rather than in the root directory of the emulated sdcard from there is should be easy to delete again… also make sure to use the correct path… file:///storage/emulated/0/... see also Some basics on Android storage system Taifun
Taifun
WRITE_EXTERNAL_STORAGE
does no longer exist on Android 11+ andREAD_EXTERNAL_STORAGE
does no longer exist on Android 13+.
Ok but why is there an error The permission WRITE_EXTERNAL_STORAGE is denied
on some devices when I just want to pick an image with the"Image_Picker" component.
Image_Picker
Some this explanation
Probably nothing. The ImagePicker tries to request READ_EXTERNAL_STORAGE on Android 13+ with the compiled app (APK). With Companion, correctly READ_MEDIA_IMAGES is requested, but this is not declared in the Companion APK either. Back to APK: Since READ_EXTERNAL_STORAGE no longer exists on Android 13+, an error message is of course displayed: “The permission READ_… has been denied. Please…”. I therefore used the ActivityStarter (android.intent.action.PICK), which I generally prefer to the Ima…
In the same thread you can find a workaround
Taifun
So as I’ve read in this topic :
I’ve tried to store the picture in the ASD using this path :
/storage/emulated/0/Android/data/<packageName>/files/
But it still doesn’t work and the Image Editor is not returning any image
I’ve tried to store the picture in the ASD using this path :
/storage/emulated/0/Android/data/<packageName>/files/
Very good
Now if you use the ApplicationSpecificDirectory method from the tools extension, you get that path dynamically, which will work for the companion app and after building any app
Taifun
Now use Do it to check the filename…
Most probably a slash is missing…
use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing and Debugging
Taifun
So this is what I get :
I added a slash and this is what I get :
On the companion when I try to set the vertical arrangement image to the edited image it doesn’t show anything :
And in the Internal Storage the image is not here anymore (btw I don’t now how to find the image and i don’t know if it’s findable)
Sorry for the delay I wasn’t home for 4 days
your filename looks fine now
when I try to set the vertical arrangement image to the edited image it doesn’t show anything :
what about providing a screenshot of your relevant blocks?
in the Internal Storage the image is not here anymore (btw I don’t now how to find the image and i don’t know if it’s findable)
you now have to look into the ASD of the companion app
You should only comment here if you actually know what you are talking about. The ASD is located in external storage and to access it the device does NOT need to be rooted. Haven't you seen my screenshot yet?
Taifun
So these blocks are used to pick an image (these blocks work fine now thanks to bodymindpower )
This is what happen when the image is picked :
And these blocks are used to display a resized version of the image in the Vertical arrangement1 :
But the Vertical Arrangement Image return nothing :
any example for the ResultUri you are getting?
is the image editor able to work with result uris?
did you find the file in the ASD meanwhile?
some things to try:
what happens, if you try to display the picked image in the vertical arrangement without scaling it?
are you able to display an image in the vertical arrangement without picking it a) from the assets or b) from shared storage ?
Taifun
So when I do this :
As you can see in the screenshot below, it returns the image I have chosen so this part works.
(btw you can see that the image is not well framed so I’m cropping it with the image editor component)
is the image editor able to work with result uris?
When I use this file name it works fine so yes the image editor is able to work with result uris
did you find the file in the ASD meanwhile?
No but I didn’t look for it (I don’t need to see it actually I just need to delete it after)
As you can see in the screenshot below, it returns the image I have chosen so this part works.
You found out, that the vertical arrangement can display result uris… but you still do not know
any example for the ResultUri you are getting?
is the image editor able to work with result uris?
A result uri is not a filename. .
What about displaying the result uri in a label so we can see how it looks like? You might have to convert it into a filename so the image editor is able to convert it…
No but I didn’t look for it
You have a strange way of debugging… to check if the file is there and what size it has might help to find the issue…
Taifun
Yes the image editor works fine with result uri because as i’ve told you
When I use this file name it works fine so yes the image editor is able to work with result uris
This is the result of these blocks :
So, the problem is not on result uri but on the image editor that can’t save the image. Because when I try to edit an image from the assets :
It returns this :
When I use these blocks :
And this :
When I use these blocks :
So the problem is on the file name
I’m sorry but I don’t get it I’ve tried many different ways but I think that the Image_Editor can’t save an image in a specific directory because I’ve tried to save the edited image in a directory that was already created and it did not work.
I’ve tried to save the edited image in a directory that was already created and it did not work.
unfortunately you forgot to provide a screenshot of these blocks, so we do not know, if there is an error in your blocks…
the link in my last answer shows how to store the image in another directory… however nowadays you should not use random directories anymore, use shared storage or ASD…
see again Some basics on Android storage system
Taifun