API calls failing when resuming app on Android Oreo

Is anyone else having problems with their apps after resuming it from the background on android? If my app sits in the background for a long time and I resume it, all the api calls fail until I kill the app completely and re-open it. I have not seen this same issue on the ios version of my app. It also doesn’t happen every time I resume the app from the background, only if it has been sitting in the background for a long time.

EDIT: After doing more research I believe this has to do with android destroying the state sometimes, which my code doesn’t account for. I’m going to try saving my data state to storage on pause event and restoring it on resume and see if that fixes my issue.