In my application, I use viewpager with tablayout. When the application is in the background for a long time, activity is recreated, but fragments are not recreated, so the data coming from the service is not updated in the user interface.
source
share