I am making an application in which user downloads the image from server, and that image is opened in the default gallery.
Now due to security reasons, when my app goes into a paused state or destroy state, the path or folder where I have downloaded the files need to be deleted.
The code for it works fine, but the problem occurs when the user opens the image in the gallery, and while viewing if he/she pressed the home button, the folder or file is not being deleted.
So is there any way that I can disable or capture the home click event when the user views the file in gallery or any other any apps (office apps to view docs and excel files)?