How do you read a text file(like .txt) in sdcard?

I'm trying to make an app that for reading dodocode of Animal Crossing.
And I'm using ACNHOrderbot for auto fetch dodocode, it will save dodocode as a file named Dodo.txt at my computer automatically.
What I wanted to do is make an app that read that Dodo.txt file every 5 second and upload it to CloudDB.
This app will run on LDPlayer(an Android emulator for Windows 10) on computer, and it will sync file in /sdcard/Pictures on emulator and C:\Users\cyrus\Desktop\Android emulator\new on computer.
So I try to read Dodo.txt in /sdcard/Pictures using File.
But it shows an error: Error 2101: The file /storage/emulated/0/Pictures/new/Dodo.txt could not be found...
What's wrong?

(blocks are not completed, but the basic block are made.)

Is my path on emulator goes wrong like it should be \sdcard\Pictures not /sdcard/Pictures?
Or the coding of Dodo.txt is specified?
Or this app couldn't run on emulator correctly?
Or the DefaultScope of File not "Asset"?

Why are you storing a text file in the Pictures folder ?
It would be easier to use the ASD files directory to store text files.
What version of android is your emulator running?

Because the emulator can only sync the file in this folder with my computer.

Android 7.1.2

  1. Post a link to the FilePicker extension.
  2. Most likely it use an absolute or full path. The File component uses a relative path.
  3. Connect to Companion and make a right mouse click on the xyz.Text block (where it gets the filePath), "Do it" and post the result.



@Mr.LightBulb But read this as well.

A non-media file must be stored by the app in one the the Shared folders

  • /Download or
  • /Documents on Android 11+

or the ASD to be able to access it.

Otherwise you need SAF.

See also here:

Do It Result: "/storage/emulated/0/Download/Dodo.txt"

Ok, if this text file was created by the app itself, try to read this file with the File component using the relative path: /Download/Dodo.txt


If the file was NOT created by the app, you must use SAF.

Note: But even with SAF you cannot access (files in) the Shared folder /Download.