I want to create a method which can update(in particular time interval) the user about the progress of tasks it is performing & finally, can return a result true/false or any object.
For eg I have to create a method which encrypts or decrypts a file/directory. So I have to show the progress of encryption/decryption & at the end I have to return true or false value whether file is encrypted/decrypted successfully or not.
I want to create this in Android(Java) & the method should be an independent one.