An application can use Android's filesystem to store and retrieve data as well. The
java.io package provides this functionality. This package provides classes to write and read different data types from a file. By default, files created by applications are private to the application and cannot be accessed by other applications. Files persist reboots and application crashes; they are only removed when the application is uninstalled.
The following code snippet shows how to create a file. As I have said before, by default, all files are private to the application.
FileOutputStream fOut = openFileOutput("MyFile.txt", MODE_WORLD_READABLE);
MyFile.txt will be created in the
/data/data/<application-path>/files/ directory. The ...