In my app I am increasing the brightness of the screen at some part and of course I need to return it back to its value before exiting my app. But I can't catch if the user uses the button and puts the app to the background. Is there any way to understand if the app will work on background so at that point I can change screen brightness to its old value.