My android application is saving some stats to internal storage. Each file name is in the format of "appname-currentDate"
I was wondering:
Thank you so much.
Internal storage is the storage of the private data on the device memory. By default these files are private and are accessed by only your application and get deleted , when user delete your application.
Head to Settings > Storage > Other and you'll have a full list of all the files and folders on your internal storage. (If you'd prefer this file manager be more easily accessible, the Marshmallow File Manager app will add it as an icon to your home screen.)
Managing files on your Android phone With Google's Android 8.0 Oreo release, meanwhile, the file manager lives in Android's Downloads app. All you have to do is open that app and select the "Show internal storage" option in its menu to browse through your phone's full internal storage.
1) Depends on which method you use to get the file handle. Normally files are stored in an application specific directory, eg. /data/data/[your.package.name]/. The files in that directory are only readable by your application.
2) Use the getFilesDir() method in your Activity to get a File handle and use the listFiles() on it to get an array of File representing all files in your application data folder.
Further reading: http://developer.android.com/guide/topics/data/data-storage.html
1-When I save to internal storage, is there a specific folder assigned to my app, or are my files saved along with files from other applications in the same direcotry.
By default, files saved to the internal storage are private to your application and other applications cannot access them (nor can the user).
And files are stored in /data/data/<package_name>/files
directory.
Particular for your application package.
2- Is there a way to know the list of files saved by my application to the internal storage.
use method getFilesDir()
Gets the absolute path to the filesystem directory where your internal files are saved.
For more information look at Android - Internal Storage
Your files will be saved in data/data/your.package.com this folder. your.package.com is your package name.
You can see that in ddms. If you use eclipse and run emulator or device you can see your files in eclipse -> ddms tab
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With