I'm looking for a solution to record information I get from my device with ESP32.
I see there is a lot of incompatibility with the API version / internal or external storege...
what would be the best solution, I get the information in a CSV line and I would like to save it in a file or export it to some place that can be saved and read later, but it has to run on all android devices regardless of the version and type of storage (internal or external).
the new table overview is confusing imho and actually it is quite simple:
the question is: do you need other apps to be able to access the file?
if yes, store it in Shared Storage
if no, store it in the ASD
What I need is to make a LOG of all the information I get from the device and I'm already showing it on the app's screen.
I get the device information the same as the CSV files, like: data1|data2|data3|data4...
I was a little confused after researching the best method to do this, I see a lot of people complaining about the incompatibility of the API version and also if the file was saved on the memory card or internal memory, since not all cell phones have a memory card...
Sorry if the text is confusing, I'm helped by google translator.
don't worry...
we are not allowed to write onto external (removable) sdcards...
you only can write onto the internal (emulated) sdcard on all devices...
Tainfun, thanks for your patience. I'll try and then let you know the result.
This is my first app and I'm still confused by the M.I.T.APP Inventor system.
Thank you so much.
I am now able to save the file.
Could you give me a hint on how to write each receipt on a new line? Because the file is overwriting itself with each receipt.
very grateful for your help.
You are doing multiple BlueTooth.ReceiveText operations in the same Clock.Timer event.
One of them saves incoming text to a file
The other adds incoming text to a list for further processing.
Unfortunately, the second ReceiveText asks for the NEXT piece of text to arrive, so you will lose some text that way.
It's better to have just one ReceiveText block in a Timer, going into a global variable, and have all subsequent blocks in the Timer refer to that global variable's contents.
That way, you can both log and process your incoming text.
variable info is your list and not DataReceivedList DataReceivedList is just the received text separated by pipe symbol
you might want to rename your global variables accordingly... info -> listInfo DataReceivedList -> dataReceived
I tested the app on android 8.0 and got error message: 908 - The permission WRITE_EXTERNAL_STORAGE has been denied
I'm asking for permission when starting the app, but even so the error remains, there is a way to get around this problem, as it only worked correctly on Android 10
Since it works as you claim on Android 10, WRITE permission must have been granted. This means that this permission is declared in the Manifest. Then it should / must also work for Android 8 (< 10).
Of course, when we talk about permissions, we always talk about the APK and not Companion.