I am trying to create an internal file in an android application. I have generated the code that works fine with java, but in order to create the internal file I believe I must have the context to do so.
Example: File file = new File(Context.getFilesDir(), "somefile.txt");
The problem I am running into is that the file creation and checks if it is made are maintained in a singleton class that I have created. When using the following
Example: File file = new File("somefile.txt");
everything seems to compile and work, but after closing the application it seems the file wasn't created. This leads me to believe that I need the application directory using the 1st example given. The problem is how do I get the applications context within a single class?