I really noticed a small loss of information.
Thanks for the observation. I'll try to fix it and post the block diagram here.
I really noticed a small loss of information.
Dear friend, I tried to follow your tip, but I'm doing something wrong, an operation error is appearing.
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
oh my god, i was seeing this now... total lack of attention from me
It's working fine now, thanks Taifun, thanks ABG
I'm learning little by little and I'm enjoying it, I'm very grateful for your support.
Thank you very much for your attention!
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
when exactly do you get that error?
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.
the error appears from the moment I request the connection with bluetooth and it starts reading and writing data.
At first I did as you had indicated earlier, unless I misunderstood.
Hi Anke, thanks for your attention.
In reality I did the permission request test to see if it worked on Android 8, but the error message was the same.
When running again on Android 10 with this permission request at the top of the screen, the same error appeared and the file did not write, that is, the permission did not work in either of the two versions I tested, so I removed it from the project.
I'm kind of lost, because at the beginning I had already researched about possible problems according to the android version, I wanted to find a way that would work on any system
this is required to get the correct permissions in the manifest...
btw. there have been several requests to set the correct permissions to make life easier for everyone, for example here AI2 Files block - shared scope file storage cannot read / write text files to media folders - #21 by Anke or here Release nb187: Copy a text file / image from assets to shared storage (→ Android 10+) - #11 by Anke and I would like to take the opportunity again to ask @ewpatton about some feedback concerning this subject...
make sure, you first grant WRITE permission and then store the file...
you might want to provide a screenshot of how you are trying to store the file, so we also can see which directory you are using... remember... it should be
WRITE permission must be declared on ALL Android versions, even Android 11+, which of course is a bug (which I've mentioned countless times already). However, your app does not declare
WRITE in the manifest at all (on any Android version). If you dragged my
AllFilesPermission extension into your project (Screen1), the
WRITE permission on Android < 11 would have been declared in the Manifest. Then it would have worked on all Android versions < 11.
Note: It is not necessary to request storage permissions. These are automatically requested with the file component.
There are two ways to make your aia work (on all Android versions):
Do what @Taifun suggested. However, the
WRITEpermission is then also requested on Android 11+ (which is of course nonsense, because firstly this permission is not necessary there and secondly it is no longer available on Android 11+.
MFileextension. This way no storage permissions are requested on Android 11+ (as it should be). Of course, you don't have to use
AllFilesPermissionext. then, since the storage permission with the
MFileextension is correctly declared in the Manifest.
Note: And use the correct path: /Download/... for this Shared folder.
That was exactly what was missing.
I had understood it the wrong way, now it works in both versions (8 and 10).
Sorry for the lack of experience, I'm trying to learn and age doesn't help much.
Thank you very much for your enormous attention.
Anke thank you for the huge contribution.
I will continue studying the subject, thank you for clarifying my doubts.
I'm trying to learn little by little, I'm very grateful for the collaboration of all of you.
I am happy to be part of this beautiful community.
you can save the .csv in the spiff of esp32
or add a sdcard to you're esp32.
the android app read the file on the esp32.
Thanks for the suggestion friend, but I'm doing it this way just to escape the sd card and I use minimal spiffs + ota.
Whats a spiff?
The ESP32 contains a Serial Peripheral Interface Flash File System (SPIFFS). SPIFFS is a lightweight filesystem created for microcontrollers with a flash chip, which is connected by SPI bus, like the ESP32 flash memory.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.