No....
so if there's no problem on "absolute path" in it, and how can I get rid of the notification?
No to what?
The path required for Taifun's resize function, for the OP's example is:
/Pictures/image.jpg
as I suggested in the first place.
No, as I said, this is NOT a path (in this case, also not a relative path).
The relative path would be (Companion):
/Android/data/edu.mit.appinventor.aicompanion3/files/Pictures/app_inventor_1648201642677.jpg
I will leave you to test that out. Taifun is quite clear, the resize function targets files in the ASD, therefore if a file is inside a folder in the ASD, this must be set, but there is no need to provide the entire path to the ASD as well, because this is handled in Taifun's resize function.
I posted an image from his documentation to advise you, but you seem unwilling to accept this....
This has nothing to do with resizing the image....
Sorry, didn't read blocks properly
I don't get it. What are you trying to tell me?
This works just fine for me in companion:
Have you got the latest version of extension ? (Oct 21)
Can this be misunderstood in any way? I don't think so.
Oh, let me check.
I took the current example from Taifun's website.
OK, with the last version of the extension it works with the subfolder in the ASD and the fileName:
-
/Pictures/image.jpg
(which is of course NOT a path) and / or the -
absolute path:
/storage/emulated/0/Android/data/<packageName>/files/Pictures/image.jpg
imResizePath.aia (38.2 KB)
OK looks like we have that all cleared up then.
The latest version of the Image extension (Oct 21) is set to use the ASD as the base directory for image functions. If files are stored in any sub folders then these sub-folders must be included in the file path set to the resize function.
Yes, or as I said (and have shown) use the absolute path.
The extension should also provide the ability to resize images in the Shared
folders (e.g. /Pictures
or /DCIM
or /Documents
...). @Taifun
There was absolutely no reason to introduce the latest version 5 of the TaifunImage
ext (ASD only).
With the old version I was able to resize images in the ASD and in the Shared folders (of course without storage permissions on Android 11+).
So my recommendation would be to continue with version 3 or 4 if these versions are still available.
Note: Version 3 is still available in the test AIAs on Taifun's website.
Maybe @Taifun will provide the old version 3 or 4 again (additionally).
Example with version 3 (tested on Android 11):
ASD with full, absolute and relative paths:
Shared folder /Pictures:
And on this occasion, here's the next bug related to and caused by DefaultFileScope, which is the following:
If DefaultFileScope was set to Legacy and you use the Camera, the app crashes after taking a photo on Android 11+. Unfortunately, one does not learn which path from the
Camera
component is used with Legacy.
This has further consequences, because if you cannot set DefaultFileScope to Legacy, WRITE
will not be declared in the Manifest on Android 11+, which is absurdly required if you use e.g. want to work with the File
component on Android 11+. In this case you have again to switch to one of the File
extensions from @Taifun or @vknow360.
I'm really curious how many more bugs I can find until this is finally fixed.
the previous version 4 now additionally is available to download on my webpage App Inventor Extensions: Image | Pura Vida Apps
Taifun