So the CSV
file is downloaded via the app?
If so, then why move it to another location?
Students will need to upload two files:
- the .apk to install the application
- the .csv that the application can use it
or download ?
@tantangel I think we're leaving the topic here.
So open a new topic and ask your questions there precisely.
yes, sorry...
A post was merged into an existing topic: [Free] File Picker Extension - Pick File From Storage (2.1.6)
Hello:
I'm with a problem reading a txt or csv archive. I need that the app read one of these archives, that can be in one directory (Documents/Download or other created in /storage/emulated/0/ . The problem is that this archive is writen ther by a NFC card, so as it hasnt been created by the app, the app doesn
t read it. And for the NFC is not possible to write the txt archive into ASD directory o Private...
What can be a solution for that?
If it is (as you say) in the root directory of the external storage or in /Download
, there is no other solution than to declare the MANAGE_EXTERNAL_STORAGE
permission in the Manifest. However, unless you can explain why this is a core part of your app, the app will most likely not be approved by Google in the Play Store.
If the file is in /Documents
or another directory (not mentioned above), there is no problem using SAF.
Thanks for your answer. I've read deeply your post, so I used ASF but couldn't access to the data inside the archive. As you said it could be the best wayt to avoid Play Store problems.
NFC copy a file (registro.txt with CSV as data) into Documents/data/registro.txt,
I simplify the code to this function:
But I get "No content provider: /Documents/datos/registro.txt" as an answer instead of the data.
I had 'Legacy' in screen properties in orther to reach Documents/data directory. (Is that the correcto option?)
What i'm not doing well?
Sorry not ASF --> SAF
You need to use OpenSingleDocument block first, then in GotUri event, ReadFromFile.
Any way read all the posts in the thread of SAF extension, since for how to use SAF it's off-topic.
Thanks. It was quite helpful. I got the data inside the file, so it works also for me. But, what I dodn't is to prompt to choose the file, because the file is going to be always at the same path ( Documents/data/registro.txt. Any way to get the URI from a fixed path?
save the uri in tinydb. and also you need to request to remember the reading permission (there is a relative block).
For what reason or for what purpose?
What I want is not to choose the file, because i know it is going to be at the same place. /Documents/data/registro.txt . I don't understand how tinydb can help....
I tried with this code to avoid the prompt window to choose the file, because i need that it happens automatically...
but it seems that ContenUri that FileTools1 give is nothing to do with URI that uses SAF.
But i need a similar structures for my program that could work. Any idea?
Anke! Any way to avoid Document Picker? Can I have read that it isn't possible beacause of permissions that user give to the file when picking? I'm struggling whith.... Thanks anyway!
No, you must use one of these two blocks for SAF to work:
Thanks Anke!. Now the only way is to declare the MANAGE_EXTERNAL_STORAGE. I'm going to learn how it works.