No, you can close the app or switch devices and offline earnings will continue to accumulate in the background. Just remember to collect them when you open the app again.