Android standalone app restart every time launched from app icon

Sdk 27.0.0

Android standalone app restart every time launched from app icon, even if app is running in the background.
Used to work well on older sdk.
When launched from notification, works as expected.

Any idea how can that be fixed?

Hi @oren - there are a number of things that might be causing this. Is your app using lots of memory or attempting to do any heavy processing? If so, sometimes it can be killed by the OS while in the background in order to reclaim memory on the device. Does the restarting happen consistently, no matter how long the app is in the background?

It’s also possible your JS code is erroring periodically, which can cause it to automatically refresh. If this is the case, you should see an exception being reported in your device logs, which are accessible via adb logcat.

Hope this helps – let us know if we can provide more information or help in some other way!

Hi Eric,

Thanks for the reply, our app doesn’t consume more memory or doing more processing than it used to do before.

I tracked the behavior of the app for the last couple of days, and it feels that it used to do restart consistently for couple of days (regardless the time the app is in the background), and this behavior suddenly stopped, it the last 24 hours, no restarts at all, the app can be in the background for 10 hours and no restart when launching again.

I really can’t explain the change in the behavior, but I will give it more time, I will continue to track it, for now I won’t o any actions.

Thanks again for your explanations, it is more clearer now.

Oren.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.