Elements do not see in the list, only the first

Gabriele,
the new txt file is really short. The content is not enough to test meaningfully the algorithm unless we create dummy data.
The structure seems to be:
24615,U,11,12,2020,12,10
24615,E,11,12,2020,12,10
where:
badge code 24615, U(=Uscita-Exit), day, month,year, hour, min 0x0A (LF)
badge code 24615, E(=Entrata-Entry), day,month,year,hour,min 0x0A (LF)
If yes, in your sample it seems that entry and exit time are the same ?
Is it correct ?
Are there other (hidden) data in the original file ?
Ciao, Ugo.

PS/ dumped in HEX

@gabriele_lorenzoni

It would really help if you showed ALL your relevant blocks, this includes the blocks you use to create the file in the first place - where is the data coming from, how/why create a file?

From what I can see you do not need to use the Kio4 Explorer extension, the File component will do all the work for you.

sono dovuto passare da "file" a "kio4" perchè con "kio4" posso creare le directory anche nel percorso "/mnt/sdcard/" e all'interno creare file cosa che con "file" non riesco o comunque se testo con "ai companion" il percorso è diverso. E se cerco di creare il file mi da errore perchè vorrei che leggesse il file, se esiste, difatti se non esiste mi rende errore" file not found", poi lo crea...
I attach file aia
thank you so muchCartellini.aia (55.6 KB)

The problem is that if the component that reads the file recognized "LF" then my algorithm shown above would work. Unfortunately, something is wrong and the lack of LF means that this algorithm does not work because there is one long list.

1 Like

As I wrote. The extension misses line breaks when reading. The file saved in the phone memory is correct.

1 Like

I don't know if it makes sense to make an application that creates its own folder. From android11 it will not be possible and it is best to save the data immediately in the ASD directory or export it online to a Google sheet. Another way would be to store the data in TinyDB in the application memory and be able to export it to a file if necessary.

1 Like

hello, thanks for the information on android 11, I immediately put the advice into practice but with the "FILE" element I can't write on "Android / data /" + my folder, where am I wrong? I wish I could use "FILE" with the same path with both "ai companion" and compiled apk, sorry I'm at the beginning ...

I think @Anke could help with the new file read / write system. I am still confused with this and I do not have a new android for testing. Then, if you deal with enrollment in asd, we will advise you on the correct processing of your data.

You can use an extension that detects developer mode. Then build a block "if developer mode then link1, else link2.

See here:

1 Like