I have big size project with 228 files [ size 600 mb ] need help to build it and make it offline

Hello Everyone

I have big size project with 228 files [ around 600 mb size ] need help to build it and make it offline

how can i make simple procedure to download files into assets folder and check if there are already there or not , is there also md5 or hash file checker to check the integrity of the file is correct too ?

thank you all.

For the files download (you cannot download files into the assets, you will have to use the ASD or private directory)

For a sha256 or sha512 hash (extension)


1 Like

so in my case it's better to make project without plenty of files and at first run they get downloaded , i want to use them with taifunplayer + file component [ i changed it settings to assets ] do you mean i can only use [ ASD or private ] directory after downloading [fetching] the files ?

... or one of the Shared folders (on Android 11+).

1 Like

I tried this

in the emulator with 10 files , it seems after it's finished it doesn't save it as it's finished downloading , so on the second run it also retries to redownload the same 10 files again any fixes ?

how can i get the size of each file in order to show it up for the user

like downloading file size [ 10 mb ] , [ 20 mb ] ...

Did you setup the tinydb "firstrun" tag correctly ?

You need to get these server side, then include the file size in your blocks (as another list, or a part of a list) and display the value related to the downloading file.

yes i used the same example here

[mod edit link removed FileByFile.aia, contravenes site requirements]

I only changed [ strpath ] to --> [ /X/ ]
and the list of files 10 items each ends up with .mp3

but it doesn't work it keep redownloading it again on the next run.

  • update *

how can i read a file using file component ( what default scope should i use , i used to use [ assets before , but it doesn't find the right path ) can you help me in that ?

Check the tag values. In Screen.Initialise the tag is firstrun" whereas in the web1.GotFile it is firstrun - these need to be the same.

1 Like

I will make big procedure of if statements to check if the file is already saved or not , but i'm still facing problem on reading the already downloaded files , in emulator it's path is [ mnt / shell / android / data / app name / [ download path folder ]

but the problem is that I still don't know how to access it.

Your default scope should be App (in Designer, and elsewhere). This should give you a file path to the ASD

Which emulator is this ? file path should be:

1 Like

I checked it now the path is fixed.

but there's still one weird problem i couldn't fix , let's say

there's 10 files to be downloaded based on that code it will download the whole 10 files then it will be considered complete and done , is there anyway to make it if he completes the 2 or 3 files and got disconnected to continue from the 4 file to download not start all over from the beginning.

because in my case he needs 114 files

or i'm thinking of download each file per need from the url list but i couldn't manage it so far.

regarding the path i used

[ file:///mnt/sdcard/Android/data/Packagename/files/ download folder global variable ]

emulator is KOplayer [ https://koplayerpc.com/ ] one of fastest small size emulator ever.

1 Like

can you share the blocks [ aia file for this part only please ]

thank you.