-1

I am writing an AndroidApp, where I save some Data by using the following File:

File File = new File(getFilesDir(), "Kategories.txt");

Then I create a FileWriter and so on...

First of all: IT WORKS!!! The Data gets saved and when I reopen the app, the program is able to get the data out of the Storage.

BUT, I cant find the Data-Files in the Storage!!! I have seached it everywhere! In the Internal Storage, in storage/Android/data/ my package name is not there... Where could it be?!

PS: I use Android Studio:)

RyanZim
  • 6,609
  • 1
  • 27
  • 43
justMe
  • 29
  • 3

2 Answers2

1

I cant find the Data-Files in the Storage!

The file is stored in what the Android SDK refers to as internal storage. You can access this using the Device File Explorer in Android Studio, but only for debuggable apps.

In the Internal Storage, in storage/Android/data/ my package name is not there

That is what the Android SDK refers to as external storage.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
0

If you search with an file explorer on your app you wont be able to find it, because your files are private. Have a look at the documentation:

Files saved here are accessible by only your app

If you want the files to be public have a look at this section. Then you should use getExternalStoragePublicDirectory() instead of getFilesDir(). If you want your files to be on internal storage and public look at this answer.

pedzer
  • 142
  • 11