How to Copy File from Assets to Internal Storage?

Hello, everyone!
I would like to ask a question : How do I copy files (small pdf) from the assets of my app to the internal storage?

I have read these posts :

It previously works in the previous version of Kodular, the Eagle one
I suspect that the extension has some problem in this new version of Kodular, but I am not really sure.

Below are the things I have done, using the Taifun’s File Extension + Kodular’s Sharing Component
The error message that appears when I share the file : “/storage/emulated/0/Makeroid/assets/brosur_NBS” and “File not found for sharing”
I have granted the storage permission for the app.

After I checked in the File Manager, apparently the app successfully creates the folder but the file is not there, I think this is why the app failed to share.

So, how do I copy it correctly?
Thank you!

Build the APK and try (it should work until Kodular targets Android 11, Aug 2021).

For Companion & APK:

2 Likes

Thank you for the answer, Anke!
I am so delighted with the solution you have provided.
But where do you get that block that says “join” but they have it horizontally?
image
Source: Anke

I can only find this
image

Thank you!

Right click on that block and choose inline inputs.

3 Likes

Hi there, Peter!
Thank you for the help, I am now able to obtain the horizontal input for the “Join” block.

If it is alright, I would like to ask the last question, please. It is still related to the picture that has been sent by Anke.
image
Source: Anke

In the bottom, there is a line, call getASD1 …
May I know the details about GetASD? Does it mean I have to add two Taifun’s File Extension in the screen?

Thank you!

Of course not.

GetASD is an extension created by @bodymindpower… alternatively you also can use the ASD blocks from the TaifunFile extension

Taifun

2 Likes

Please tell how to copy .html file from assets to tiny db

Files can only be copied from internal storage (assets) to the privateDir (internal storage) or to external storage and the ASD. Since Android 11, files can only be copied to the ASD and special Shared folders.

For more details see here:

This has nothing to do with the TinyDB. There paths, text etc. can be saved, but not files.