Android - How to create a folder that can't be accessed by user?

126 views Asked by At

I have created a file inside one folder in android and I have encrypted that file. When user clicks "READ" button in my app, the specified file will be decrypted in same folder. but I want the users not to access those files via USB or file manager. How to implement this concept?

1

There are 1 answers

1
Rishabh Mahatha On

Use this

context.getDir(null, Context.MODE_PRIVATE);

In place of

context.getExternalCacheDir()

This will solve your problem.