Obtaining the working folder
suggest changeYou can get your app-private files directory by calling getFilesDir() on your Activity (Activity is the central class in your application that inherits from Context. See here). Reading uses the same directory. Only your application will have access to this folder.
Your activity could contain the following code, for instance:
File myFolder = getFilesDir();
File myFile = new File(myFolder, "myData.bin");
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents