How can I lock files in android using java code?

android, file, java, locking

Solution

I think you want to encrypt the file. While the file can still be moved around, it will be useless to anything but your application. People will be able to copy, move, delete but the contents won't be compromised.

Problem

I want to lock files that is on the sdcard of android. I need to lock them so no one except my software can delete copy move or send them over bluetooth or any other way. How can I do it?

Original source