I am trying to create a file in the internal memory (not on a flash drive).
File file = new File(getApplicationContext().getFilesDir(), "123.txt"); FileOutputStream outputStream; try { outputStream = openFileOutput("123.txt", Context.MODE_PRIVATE); outputStream.write("123.txt".getBytes()); outputStream.flush(); outputStream.close(); } catch (Exception e) { e.printStackTrace(); } The file is not created, I look in the data / data / folder and then it is empty, there is not even a folder with the name of the application. What am I doing wrong?