File .Exists gives runtime error in Android<4.4, if the File component doesn't requests read/write permissions

Right.
The question is with scope set to App, the File .AppendToFile or File .Exists, or File .SaveFile blocks used to create this path and write the file there (which I could see from the pc).
But if you compile the same app now, they must be writing or reading the files from somewhere else.
After running Anke's app I can see other apps ASDs, but not their's.
imagen

It looks like you are only able to see a few subdirectories of /Android/data, but not all of them...

Strange, my understanding up to now was, that after connecting your device via USB to your computer you should be able to see all subdirectories...

Maybe this can help

Taifun

Did you enable the "developer options" on you test device?

1 Like

That was the key. Thank you Anke.

I forgot to enable the developer options, because it's something you only need to do once, when you start using a new device.

Now I can see all ASD folders

image

One more hint.
Before enabling, I could create new folders in the device from the pc, but I couln't rename them. But now I can.

You are right.
My mistake was: If you don't see them, doesn't mean they are not there.

Sumarizing.
To see from the pc file manager the subdirectories of /Android/data (the Application Specific Directory, or ASD) that your app uses to store certain files in the Android device where it is installed (not the assets compiled with the app, nor the companion), you need to:

  • Connect both devices via USB cable (a complete one, which is not only suitable for charging the batery).
  • Set in the Android device, that you want to use the USB cable for transfering files.
  • Enable the developer options in the Android device (just once, for new devices), by pressing several times in Build Number.
  • Optionally, you can set in the pc that you want to open the file manager each time the Android device is connected via USB, or
  • Open manually the file manager on the pc, and select the Android device to see the folders and files at the external storage (Android point of view), or internal (emulated) sd card (device's manufacturer point of view), or whatever the name is. The path will be like this: .../Android/data/<package name>/files

By the way.
Does somebody know a better way to update the files displayed by the pc file manager, other than unpluging the USB cable and pluging it again?
P.D.: In my new device, I even need to restart it, for updating the files displayed in the pc.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.