App Recovery (restoring photos and data)

I’ve noticed my app restarts when you switch to another app for some varying amount of time and then return to it. I’m sure this is normal OS behavior as it frees up resources, but basically it’s the equivalent of an app crash.

The issue is that I’m losing all of the data a user has entered. Most of it is forms data which I could probably save in localStorage and then reload on app restart. However, I also allow the user to add photos which I display from the client blob data and later upload to our server. I’m not sure how to recover those without immediately uploading them and loading them from the server. Is there a better way of storing image data locally?

Any other tips for recovering from app restarts or crashing?

Only on Android?

If yes, here my feed about this subject https://forum.ionicframework.com/t/solved-camera-plugin-restart-app-on-android-8-1