This way you can list (specific) files from assets using Companion, if your device is running Android 10 or higher:
→ App Inventor Extensions: File | Pura Vida Apps
→ App Inventor Extensions: Tools | Pura Vida Apps
This way you can list (specific) files from assets using Companion, if your device is running Android 10 or higher:
→ App Inventor Extensions: File | Pura Vida Apps
→ App Inventor Extensions: Tools | Pura Vida Apps
Good stuff
What changes in a compiled app ?
Everything stays as it was before.
Assets are stored in Internal Storage:
/data/data/<packageName>/
The blocks remain exactly as they are then it is just the packagename that changes due to not being the companion app.
/data/data/ ?
While we put the assets in the external storage partition for debugging purposes, people really shouldn't rely on that for two reasons:
Exactly what I said.
Then we have to adjust something in the blocks for debugging. So what's the problem?
Because this (problem) already exists now.
I should also point out that the assets folder for the companion will contain the union of all assets for projects you've loaded, it's not just the assets specific to the current project. There's no guarantee in your blocks image that listAssetsJPG will be the same in the companion and the compiled app because of this.
Of course, but I wanted to keep this little guide short. It is no problem to filter the jpg files from the listAssetsJPG.
it looks like I should make a short adjustment in the FileListFromAssets method for API >= 29...
Taifun
I forgot to mention this earlier, but Version 13 of the file extension now correctly lists the files from the assets also for devices running Android 10 or newer
Taifun