Android: Ionic app restarts from splash when woken from background, iOS keeps it alive

I have one question about keeping an app “active” in background.

iOS: if i’m using a the App Alpha, then i use the app Beta and the app Gamma and i put down my phone and I use it again after A LOT of time (or days! ) if I open again the app ALPHA, it works like i never closed it and everything starts from the last active state.

Android: If I minimize in background a certain app and I open it again after a while, it opens like it was the first time, running again all its tasks (and this is a problem in case I want to send a push notification with an internal navigation url, because it won’t find the route: in fact it doesn’t happen if i send the same notification again adn the app in currently active or just put in background, it goes directly to the specified internal route - for example, a “book now” push notification redirect the user inside the app to the route “book now”)

Do you know if there is something I can do to let the Android OS “keep the current working state” even if i dont use the app for a long time?

My goal is having the last state “active” if I use an app, even if I put it in background or i don’t use it for a long time (Android desired behavior)

I guess there is something to set for keeping an app alive because i’ve tried other commercial apps and some of them stay alive even if kept in background for a long time. iOS instead, always keeps my apps alive.

I’ve tried


but it doesn’t change android’s behavior

ok the solution is to set this tag in android manifest