I do not know if minimizing would be the correct word, I think not ... Please correct me.
I have an application and want to prevent anyone from minimizing it by using the Home button, if someone presses Home, the application will be completely finished, including all the Activities that have been opened, and also need to execute a method when that application is finalized in these terms ...
How to do it?
Edit: It is an application that the user can select files to protect against access from other applications, these protected files can be accessed only by my application (it asks for login), while my application is running the files are unprotected, it needs to 'unprotect' them to read, many laymen click on the Home button and think the application has been finalized, I want to avoid this, I want to prevent the files from remaining unprotected because the application is still running, and I want to avoid another one person to take the user's cell phone and end up gaining access to the application and files because it is simply open