Is there a way to make sure that the folders that my Android application creates are not visible and accessible in another application. For example, my application created 2 file folders. I go through some file manager and they are not displayed there.
2 answers
So do not create directories in directories accessible to all applications (sdcard, etc.); use as a parent directory for your directories the result of a call to Context.getFilesDir () or Context.getCacheDir () (depending on the task).
- I create folders Encrypt and Decrypt there will be stored encrypted files. - Evilleks
- Okay, something like this: File encryptDir = new File (context.getFilesDir (), "Encrypt"); - falstaf
- I'm creating it this way. sdPathEN = new File (sdPathEN.getAbsolutePath () + "/" + cr_dir_encr); if (! sdPathEN.exists ()) {sdPathEN.mkdirs (); } - Evilleks
|
Well, the classic way to start likuksa folder name with (points)
example:
.i_am_invisible_folder
- Not funny. - Evilleks
- and what sobsno option does not like? - Gorets
- Apparently, with this method, access to these directories by other applications remains possible. - falstaf
- Why is this? by the same name will be available. - Gorets
- Well, yes, by name will be available, while the question clearly states "that they are not visible and accessible in another application." - falstaf
|