0
votes

I'm using Ionic Framework

In the Android platform when the user trigger the "hardware back button" and there is no parent state (or anything else that handle the hardware back button), the app closes but it still in the App history, but when I reopen it, it loads from the start like it was close and not paused.

Is there anyway to prevent this closing.

1

1 Answers

2
votes

As per cordova docs add following line in config.xml

<preference name="KeepRunning" value="true" />

It will Determine whether the application stays running in the background even after a pause event fires. Setting this to false does not kill the app after a pause event, but simply halts execution of code within the cordova webview while the app is in the background.