Hi, I'm having some trouble coding the reset button on my app.
So the app is to collect sensor data over bluetooth which can then be saved into the internal storage section as an csv. The app is overall functioning and able to collect data and able to save the file. However, when I press the reset button, everything seems to reset except for the creation of a file in the internal storage. I get the error that the file cannot be created. The settings is fine if I exit the app and reconnect the bluetooth, but I want to be able take a new reading and save it as a new file when I click the reset button.
I wasn't able to find a similar topic in the Help section, but if there is, please forward it on. Any help is highly appreciated.
if the file already exists, you can't create it again, you first have to delete it
Or is the filename always different?
can you provide a screenshot of the exact error message?
The filename changes as the name contains the current time. The error I get is 2103: The file/storage/emulated/0/Data_(current time).csv could not be created. The rest data that is being streamed is still being monitored but I can't view or save the file.
According to the error message you are trying to store a file in the root directory of the internal sdcard... this is not possible... see also Some basics on Android storage system
I saved the data in ASD originally and then read the file into a label and then saved the label under a specific file name in the internal storage as excel sheets with the date and time as the file name.
These blocks do not save anything
Somewhere in your blocks you are trying to store the file in the root directory of your internal (emulated) sdcard, which is /storage/emulated/0