Sn0opr
Sn0opr

Reputation: 1026

Ionic application close the app on back button

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.

Upvotes: 0

Views: 2355

Answers (1)

Arpit Vasani
Arpit Vasani

Reputation: 1023

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.

Upvotes: 2

Related Questions