I am developing Android app and i want to have log file. I am able to create log file on the emulator and see it but when I ran the application on the device the log file is not generated. not only that, the directory with package name is not created under the /data/data/.
FileOutputStream loggerFile;
OutputStreamWriter LOGGER;
Calendar c ;
private static String LOG_FILE_NAME = "QuickPark.log";
loggerFile = openFileOutput(LOG_FILE_NAME,
MODE_APPEND);
LOGGER = new OutputStreamWriter(loggerFile);
LOGGER.write("Application started to run on " + c.get(Calendar.DATE) + " -- " + c.get(Calendar.HOUR_OF_DAY));
More clarifications: I ran this code on the device, connected to it and did not see the dir with package name.
please help me understand what i am missing.
Thanks, Dudy.