My goal is to show a pause dialog (which is a DialogFragment) in my activity when the entire app has been moved to the background and when it is brought to the foreground again I want to show this dialog.
The onRestart() method provides a solution. But onRestart() isn't called when I, for example, move the app to the background when the screen orientation is portrait, then change the orientation to landscape and bring the app to the foreground again. So onRestart() only works if the screen orientation remains the same.
Who has an idea to solve this problem?